fixed byte order dependency
authorAndrew Tridgell <tridge@samba.org>
Wed, 14 Nov 2012 23:36:40 +0000 (10:36 +1100)
committerAndrew Tridgell <tridge@samba.org>
Wed, 14 Nov 2012 23:36:40 +0000 (10:36 +1100)
alloc_mmap/alloc_mmap.c

index 0557cf4..8f340aa 100644 (file)
@@ -332,7 +332,7 @@ static void alloc_refill_bucket(struct bucket_state *bs)
 #if PID_CHECK
                ph->pid = getpid();
 #endif
-               memset(ph->used, 0, (ph->num_elements+7)/8);
+               memset(ph->used, 0, 4*((ph->num_elements+31)/32));
                state.num_empty_pages--;
                THREAD_UNLOCK(&state.mutex);
                return;