aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/beam_load.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2015-09-16 15:02:50 +0200
committerRickard Green <[email protected]>2015-11-12 15:25:48 +0100
commit3ac08f9b668613a4292436979eacc61863c2ab94 (patch)
tree8635b3377426bf1a332148b778189e9c61005c6d /erts/emulator/beam/beam_load.c
parentec4a7e7150c47523a553cac806c86ec08ab2dae7 (diff)
downloadotp-3ac08f9b668613a4292436979eacc61863c2ab94.tar.gz
otp-3ac08f9b668613a4292436979eacc61863c2ab94.tar.bz2
otp-3ac08f9b668613a4292436979eacc61863c2ab94.zip
Fragmented young heap generation and off_heap_message_queue option
* The youngest generation of the heap can now consist of multiple blocks. Heap fragments and message fragments are added to the youngest generation when needed without triggering a GC. After a GC the youngest generation is contained in one single block. * The off_heap_message_queue process flag has been added. When enabled all message data in the queue is kept off heap. When a message is selected from the queue, the message fragment (or heap fragment) containing the actual message is attached to the youngest generation. Messages stored off heap is not part of GC.
Diffstat (limited to 'erts/emulator/beam/beam_load.c')
-rw-r--r--erts/emulator/beam/beam_load.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/erts/emulator/beam/beam_load.c b/erts/emulator/beam/beam_load.c
index 7a1a563be2..5db971b6af 100644
--- a/erts/emulator/beam/beam_load.c
+++ b/erts/emulator/beam/beam_load.c
@@ -902,7 +902,7 @@ static ErlHeapFragment* new_literal_fragment(Uint size)
ErlHeapFragment* bp;
bp = (ErlHeapFragment*) ERTS_HEAP_ALLOC(ERTS_ALC_T_PREPARED_CODE,
ERTS_HEAP_FRAG_SIZE(size));
- ERTS_INIT_HEAP_FRAG(bp, size);
+ ERTS_INIT_HEAP_FRAG(bp, size, size);
return bp;
}
@@ -1528,8 +1528,8 @@ read_literal_table(LoaderState* stp)
}
if (heap_size > 0) {
- erts_factory_message_init(&factory, NULL, NULL,
- new_literal_fragment(heap_size));
+ erts_factory_heap_frag_init(&factory,
+ new_literal_fragment(heap_size));
factory.alloc_type = ERTS_ALC_T_PREPARED_CODE;
val = erts_decode_ext(&factory, &p);