summaryrefslogtreecommitdiff
path: root/shmem
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2002-01-09 04:35:10 +0000
committerWilliam A. Rowe Jr <wrowe@apache.org>2002-01-09 04:35:10 +0000
commit85d694d90ea3c34cf491d6ea8213e85cc270fe15 (patch)
tree30a0a14cce7705f18140f8d69d7cea27ceb581a3 /shmem
parent0e13ed5aac7acca3c9190d02d43be0531f244919 (diff)
downloadapr-85d694d90ea3c34cf491d6ea8213e85cc270fe15.tar.gz
Correct the shm length returned based on the original reqsize
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62730 13f79535-47bb-0310-9956-ffa450edef68
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);