Age | Commit message (Collapse) | Author |
|
This reverts commit 6cd37713781a3092f8166b2178fae35cbfec1e28.
|
|
We can also quite simply allocate bigger blocks. Anyway, we need these
blocks to be aligned to their size which needs one mmap() two times
bigger and then two munmap()s returning the unaligned parts.
The user can specify -B <N> on startup when <N> is the exponent of 2,
setting the block size to 2^N. On most systems, N is 12, anyway if you
know that your configuration is going to eat gigabytes of RAM, you are
almost forced to raise your block size as you may easily get into memory
fragmentation issues or you have to raise your maximum mapping count,
e.g. "sysctl vm.max_map_count=(number)".
|
|
unnecessary syscalls
|
|
unnecessary syscalls
|
|
|
|
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.
|
|
The babel protocol code was initialising objects returned from the slab
allocator by assigning to each of the struct members individually, but
wasn't touching the NODE member while doing so. This leads to warnings on
debug builds since commit:
baac7009063d ("List expensive check.")
To fix this, introduce an sl_allocz() variant of the slab allocator which
will zero out the memory before returning it, and switch all the babel call
sites to use this version. The overhead for doing this should be negligible
for small objects, and in the case of babel, the largest object being
allocated was being zeroed anyway, so we can drop the memset in
babel_read_tlv().
|
|
|
|
|
|
Thanks to Job Snijders for the bugreport.
|
|
Route attributes was used after rta was freed during copy-on-write in
filter code. This causes some random crashes, esp. with multipath
routes.
|
|
|
|
|
|
Not quite standard construction, i should add
some autoconf macro.
Not tested yet.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
to see what resource does the address given as a parameter belong to.
|
|
and other non-portable functions on all systems.
|
|
just #define FAKE_SLAB at the top of lib/slab.c to bypass it.
|
|
|
|
Complete resource manages and IP address handling.
|