apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: apr/shmem/win32 shm.c
Date Wed, 09 Jan 2002 04:35:11 GMT
wrowe       02/01/08 20:35:10

  Modified:    shmem/win32 shm.c
  Log:
    Correct the shm length returned based on the original reqsize
  
  Revision  Changes    Path
  1.3       +5 -4      apr/shmem/win32/shm.c
  
  Index: shm.c
  ===================================================================
  RCS file: /home/cvs/apr/shmem/win32/shm.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- shm.c	9 Jan 2002 01:47:04 -0000	1.2
  +++ shm.c	9 Jan 2002 04:35:10 -0000	1.3
  @@ -179,12 +179,13 @@
       (*m)->pool = pool;
       (*m)->hMap = hMap;
       (*m)->memblk = base;
  -    (*m)->usrmem = (char*)base + sizeof(memblock_t);
       (*m)->size = size;
  -    (*m)->length = reqsize;
  +
  +    (*m)->usrmem = (char*)base + sizeof(memblock_t);
  +    (*m)->length = reqsize - sizeof(memblock_t);;
       
  -    (*m)->memblk->length = reqsize;
  -    (*m)->memblk->size = size;
  +    (*m)->memblk->length = (*m)->length;
  +    (*m)->memblk->size = (*m)->size;
   
       apr_pool_cleanup_register((*m)->pool, *m, 
                                 shm_cleanup, apr_pool_cleanup_null);
  
  
  

Mime
View raw message