summaryrefslogtreecommitdiff
path: root/sysdep/bsd
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-11-01 18:40:56 +0100
committerMaria Matejka <mq@ucw.cz>2022-11-02 12:56:54 +0100
commit9d03c3f56ced3d3191982f57029f9a3d12fa2e5a (patch)
treead1fa71442ad21704a99a18653d716b088bb2b78 /sysdep/bsd
parent37b644413723670928f6b54f2abe0c852eb0b652 (diff)
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.
Diffstat (limited to 'sysdep/bsd')
0 files changed, 0 insertions, 0 deletions