Got it: sizeof(SlabBlock) isn't a multiple of MAXALIGN, (gdb) p sizeof(SlabBlock) $4 = 20
but this coding requires it to be: #define SlabBlockGetChunk(slab, block, idx) \ ((MemoryChunk *) ((char *) (block) + sizeof(SlabBlock) \ + (idx * slab->fullChunkSize))) So what you actually need to do is add some alignment padding to SlabBlock. I'd suggest reverting df0f4feef as it seems to be a red herring. regards, tom lane