[OpenSIPS-Devel] [NEW] Improved version of f_malloc
andrei dragus
andreidragus at yahoo.com
Mon Oct 26 14:58:01 CET 2009
Hello,
A new version of f_malloc (fast memory allocator) was added to the trunk.
Improvements over existing f_malloc implementation:
1. No more memory fragmentation:
- Memory fragmentation is prevented during normal allocations.
- If an allocation cannot find a large enough size, it will start a forced memory defragmentation until it builds a proper size. ( this may be a little slow, but it will generaly not get to this case because of the prevention methods).
2. Allocation speeds have improved*:
- old version: malloc = 0.075 ms free = 0.037 ms
- new version: malloc = 0.050 ms free = 0.043 ms
Hope you find this useful.
Thanks,
Andrei.
* Times represent total times measured for 1.800.000 allocations and 1.800.000 frees on a 2Ghz machine.
More information about the Devel
mailing list