summaryrefslogtreecommitdiff
path: root/source3/locking/shmem_sysv.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/locking/shmem_sysv.c')
-rw-r--r--source3/locking/shmem_sysv.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source3/locking/shmem_sysv.c b/source3/locking/shmem_sysv.c
index 192ed32344..b57116f7b8 100644
--- a/source3/locking/shmem_sysv.c
+++ b/source3/locking/shmem_sysv.c
@@ -48,11 +48,7 @@ extern int DEBUGLEVEL;
#define SEMAPHORE_PERMS 0666
#endif
-#ifdef SEMMSL
-#define SHMEM_HASH_SIZE (SEMMSL-1)
-#else
-#define SHMEM_HASH_SIZE 63
-#endif
+#define SHMEM_HASH_SIZE 13
#define MIN_SHM_SIZE 0x1000
@@ -330,6 +326,9 @@ static BOOL shm_free(int offset)
DEBUG(6,("shm_free : freeing %d bytes at offset %d\n",
header_p->size*CellSize,offset));
+
+ /* zero the area being freed - this allows us to find bugs faster */
+ memset(shm_offset2addr(offset), 0, header_p->size*CellSize);
if (scanner_p == prev_p) {
shm_header_p->statistics.cells_free += header_p->size;