Slab: head now uses bitmask for used/free nodes info instead of lists
From now, there are no auxiliary pointers stored in the free slab nodes. This led to strange debugging problems if use-after-free happened in slab-allocated structures, especially if the structure's first member is a next pointer. This also reduces the memory needed by 1 pointer per allocated object. OTOH, we now rely on pages being aligned to their size's multiple, which is quite common anyway.
Showing
- configure.ac 1 addition, 0 deletionsconfigure.ac
- lib/bitops.h 1 addition, 0 deletionslib/bitops.h
- lib/resource.h 4 additions, 0 deletionslib/resource.h
- lib/slab.c 61 additions, 67 deletionslib/slab.c
- sysdep/unix/Makefile 1 addition, 1 deletionsysdep/unix/Makefile
- sysdep/unix/alloc.c 80 additions, 0 deletionssysdep/unix/alloc.c
Loading
Please register or sign in to comment