aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_goodfit_alloc.c
diff options
context:
space:
mode:
authorJohn Högberg <[email protected]>2018-08-29 16:21:17 +0200
committerJohn Högberg <[email protected]>2018-12-07 12:28:51 +0100
commit1d549eddbeeccf7d108310466de5f63af04b004c (patch)
tree6c3623605f7f1b80ec732caac2d4adb1b6bb08d3 /erts/emulator/beam/erl_goodfit_alloc.c
parent4b9836a2dada60005e01067af04a0e0d9361fcee (diff)
downloadotp-1d549eddbeeccf7d108310466de5f63af04b004c.tar.gz
otp-1d549eddbeeccf7d108310466de5f63af04b004c.tar.bz2
otp-1d549eddbeeccf7d108310466de5f63af04b004c.zip
Mark free blocks in pooled carriers as unused (MADV_FREE)
This lets the OS reclaim the physical memory associated with these blocks which reduces the impact of long-lived awkward allocations. A small allocated block will still keep a huge carrier alive, but the unused part of the carrier will now be available to the OS. Co-authored-by: Dmytro Lytovchenko <[email protected]>
Diffstat (limited to 'erts/emulator/beam/erl_goodfit_alloc.c')
-rw-r--r--erts/emulator/beam/erl_goodfit_alloc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_goodfit_alloc.c b/erts/emulator/beam/erl_goodfit_alloc.c
index 01d4aa54ff..68b9579433 100644
--- a/erts/emulator/beam/erl_goodfit_alloc.c
+++ b/erts/emulator/beam/erl_goodfit_alloc.c
@@ -226,6 +226,8 @@ erts_gfalc_start(GFAllctr_t *gfallctr,
allctr->add_mbc = NULL;
allctr->remove_mbc = NULL;
allctr->largest_fblk_in_mbc = NULL;
+ allctr->first_fblk_in_mbc = NULL;
+ allctr->next_fblk_in_mbc = NULL;
allctr->init_atoms = init_atoms;
#ifdef ERTS_ALLOC_UTIL_HARD_DEBUG