summaryrefslogtreecommitdiff
path: root/shmem
diff options
context:
space:
mode:
Diffstat (limited to 'shmem')
-rw-r--r--shmem/win32/shm.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/shmem/win32/shm.c b/shmem/win32/shm.c
index 29408194f..3b9f66cb4 100644
--- a/shmem/win32/shm.c
+++ b/shmem/win32/shm.c
@@ -179,12 +179,13 @@ APR_DECLARE(apr_status_t) apr_shm_create(apr_shm_t **m,
(*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);