summaryrefslogtreecommitdiff
path: root/mmap
diff options
context:
space:
mode:
authorwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2001-06-27 22:07:24 +0000
committerwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2001-06-27 22:07:24 +0000
commitff1e5cbb9bc0eb6505f1b1531a040926c792669d (patch)
tree51acc7a726a82efc9383eaec0eca0db22ab838e6 /mmap
parent3656d2121f82f7cc1b31b6adc2b3a47447b8d573 (diff)
downloadlibapr-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.c9
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;