mirror of
https://gitlab.labs.nic.cz/labs/bird.git
synced 2024-05-11 16:54:54 +00:00
Memory pages are not munmapped, instead we just madvise()
Memory unmapping causes slow address space fragmentation, leading in extreme cases to failing to allocate pages at all. Removing this problem by keeping all the pages allocated to us, yet calling madvise() to let kernel dispose of them. This adds a little complexity and overhead as we have to keep the pointers to the free pages, therefore to hold e.g. 1 GB of 4K pages with 8B pointers, we have to store 2 MB of data.
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#define CONFIG_RESTRICTED_PRIVILEGES
|
||||
#define CONFIG_INCLUDE_SYSPRIV_H "sysdep/linux/syspriv.h"
|
||||
|
||||
#define CONFIG_MADV_DONTNEED_TO_FREE
|
||||
|
||||
#ifndef AF_MPLS
|
||||
#define AF_MPLS 28
|
||||
|
||||
Reference in New Issue
Block a user