]> git.ipfire.org Git - thirdparty/bird.git/commit - configure.ac
Slab: head now uses bitmask for used/free nodes info instead of lists
authorMaria Matejka <mq@ucw.cz>
Tue, 21 Jul 2020 22:09:15 +0000 (00:09 +0200)
committerMaria Matejka <mq@ucw.cz>
Thu, 25 Mar 2021 15:47:48 +0000 (16:47 +0100)
commit886dd92eeefa070d8db6aaf0245a67f7a9e9b983
tree67911e19951d083c003e212578fae76d93deb01c
parent82f19ba95e421f00a8e99a866a2b8d9bbdba6cdc
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.
configure.ac
lib/bitops.h
lib/resource.h
lib/slab.c
sysdep/unix/Makefile
sysdep/unix/alloc.c [new file with mode: 0644]