wrowe       01/06/27 15:07:25

  Modified:    mmap/win32 mmap.c
  Log:
    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.
  
  Revision  Changes    Path
  1.6       +6 -3      apr/mmap/win32/mmap.c
  
  Index: mmap.c
  ===================================================================
  RCS file: /home/cvs/apr/mmap/win32/mmap.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- mmap.c    2001/06/06 16:05:21     1.5
  +++ mmap.c    2001/06/27 22:07:24     1.6
  @@ -126,11 +126,14 @@
       (*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;
  
  
  

Reply via email to