diff options
author | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2001-06-27 22:07:24 +0000 |
---|---|---|
committer | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2001-06-27 22:07:24 +0000 |
commit | ff1e5cbb9bc0eb6505f1b1531a040926c792669d (patch) | |
tree | 51acc7a726a82efc9383eaec0eca0db22ab838e6 /mmap | |
parent | 3656d2121f82f7cc1b31b6adc2b3a47447b8d573 (diff) | |
download | libapr-ff1e5cbb9bc0eb6505f1b1531a040926c792669d.tar.gz |
More crufty stuff, yes, it was my bug, and no, this is really horked since
we aren't distinguishing the size of the file backing the mmap from the
size of the mmap'ed view.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61806 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'mmap')
-rw-r--r-- | mmap/win32/mmap.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/mmap/win32/mmap.c b/mmap/win32/mmap.c index cab53992d..8a27618ee 100644 --- a/mmap/win32/mmap.c +++ b/mmap/win32/mmap.c @@ -126,11 +126,14 @@ APR_DECLARE(apr_status_t) apr_mmap_create(apr_mmap_t **new, apr_file_t *file, (*new)->pstart = (offset / memblock) * memblock; (*new)->psize = (apr_size_t)(offset % memblock) + size; (*new)->poffset = offset - (*new)->pstart; - offlo = (DWORD)(*new)->psize; - offhi = (DWORD)((*new)->psize << 32); + /* XXX: psize below should be the MAXIMUM size of the mmap object, + * (e.g. file size) not the size of the mapped region! + * Since apr doesn't seem to acknowledge the discrepancy (the mmap + * size/view/off concepts are pretty horked) this will have to wait. + */ (*new)->mhandle = CreateFileMapping(file->filehand, NULL, fmaccess, - offhi, offlo, NULL); + 0, (*new)->psize, NULL); if (!(*new)->mhandle || (*new)->mhandle == INVALID_HANDLE_VALUE) { *new = NULL; |