summaryrefslogtreecommitdiff
path: root/lib/mempool.c
AgeCommit message (Collapse)Author
2022-04-06All linpools use pages to allocate regular blocksMaria Matejka
2022-03-09Linpools with pages fixed to the final page allocator versionMaria Matejka
2022-03-09Merge commit '0c59f7ff' into haugesundMaria Matejka
2022-03-02Introducing an universal temporary linpool flushed after every taskMaria Matejka
2021-11-27Memory statistics split into Effective and OverheadMaria Matejka
This feature is intended mostly for checking that BIRD's allocation strategies don't consume much memory space. There are some cases where withdrawing routes in a specific order lead to memory fragmentation and this output should give the user at least a notion of how much memory is actually used for data storage and how much memory is "just allocated" or used for overhead. Also raising the "system allocator overhead estimation" from 8 to 16 bytes; it is probably even more. I've found 16 as a local minimum in best scenarios among reachable machines. I couldn't find any reasonable method to estimate this value when BIRD starts up. This commit also fixes the inaccurate computation of memory overhead for slabs where the "system allocater overhead estimation" was improperly added to the size of mmap-ed memory.
2021-10-13Linpools may use pages instead of xmallocMaria Matejka
2017-12-13Lib: Minor fixOndrej Zajicek (work)
2017-12-12Lib: Save/restore state for linpoolsOndrej Zajicek (work)
Also change linpool.current ptr to really point to thr current chunk.
2017-05-16Linpool: default allocation sizeJan Moskyto Matejka
2015-06-08unsigned [int] -> uintPavel TvrdĂ­k
2014-04-14Fixed bug in unused function.Ondrej Filip
2010-06-02Implements command that shows memory usage.Ondrej Zajicek
2009-09-17Fixes headers for uintptr_t (and build on NetBSD).Ondrej Zajicek
2009-09-04Clear memory allocated by ralloc().Ondrej Zajicek
This also fixes bug that timer->recurrent was not cleared in tm_new() and unexpected recurrence of startup timer in BGP confused state machine and caused crash.
2009-07-06Fixes memory alignment problems on Sparc64.Ondrej Zajicek
Not quite standard construction, i should add some autoconf macro. Not tested yet.
2004-06-01ALIGN -> BIRD_ALIGNOndrej Filip
2001-01-17Bug fix from Zheng Yuan <zyuan1@cig.mot.com>.Martin Mares
2000-06-05Documented memory resources.Martin Mares
2000-05-08Implemented debugging function rlookup() which you can call from gdbMartin Mares
to see what resource does the address given as a parameter belong to.
2000-03-31Include "lib/string.h" instead of <string.h>. It should give us bzero()Martin Mares
and other non-portable functions on all systems.
1999-10-29Simplify handling of free chunks.Martin Mares
1999-10-02Don't forget to free large blocks.Martin Mares
1999-03-29Clarify resource dumps and include them in the main debugging dump.Martin Mares
1999-03-29Added lp_flush() which flushes contents of a linear pool, leaving all theMartin Mares
memory available for subsequent allocations from the same pool. Both flushing and re-using the memory costs just few instructions.
1998-12-06Name cleanups as suggested by Pavel:Martin Mares
- cfg_strcpy() -> cfg_strdup() - mempool -> linpool, mp_* -> lp_* [to avoid confusion with memblock, mb_*] Anyway, it might be better to stop ranting about names and do some *real* work.
1998-05-24Staticized some variables and functions.Martin Mares
1998-05-03BIRD library: The story continues.Martin Mares
Complete resource manages and IP address handling.