Menu

Comparison of Arena Architecture in malloc()
📰
0

Comparison of Arena Architecture in malloc()

Reading 0:00
15s threshold

Memory Allocation Problems Limit Memory Allocation (if not necessary) Multithreaded programs often do not scale because the heap is a bottleneck. When multiple threads simultaneously allocate or deallocate memory from the allocator, the allocator will serialize them. Programs making intensive use of the allocator actually slow down as the number of processors increases. Malloc (libc) is the worst memory allocation API to use. Programs should avoid, if possible, allocating/deallocating memory too often and in particular whenever a packet is received. In the Linux kernel there are available kernel/driver patches for recycling skbuff (kernel memory used to store incoming/outgoing packets). Using PF_RING (into the driver) for copying packets from the NIC to the circular buffer without any memory allocation increases the capture performance (around 10%) and reduces congestion issues.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More