diff options
author | Sverker Eriksson <[email protected]> | 2015-03-03 19:32:00 +0100 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2015-03-12 19:15:32 +0100 |
commit | f8dbf0c0ff3bd68d720faca230356d281e4e3e42 (patch) | |
tree | 952117ca7a0f2d09a9a2c8b3431a33ebda42328c /erts/emulator/beam/erl_message.c | |
parent | 412c30b4dcdb8388b7472c8abb328f2a2fce92c0 (diff) | |
download | otp-f8dbf0c0ff3bd68d720faca230356d281e4e3e42.tar.gz otp-f8dbf0c0ff3bd68d720faca230356d281e4e3e42.tar.bz2 otp-f8dbf0c0ff3bd68d720faca230356d281e4e3e42.zip |
First stab at binary_to_term for hamt
with over estimation of heap size.
Diffstat (limited to 'erts/emulator/beam/erl_message.c')
-rw-r--r-- | erts/emulator/beam/erl_message.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_message.c b/erts/emulator/beam/erl_message.c index 8870fac7d9..e4cbd8477d 100644 --- a/erts/emulator/beam/erl_message.c +++ b/erts/emulator/beam/erl_message.c @@ -1146,3 +1146,16 @@ erts_deliver_exit_message(Eterm from, Process *to, ErtsProcLocks *to_locksp, } } +Eterm* erts_produce_heap(ErtsHeapFactory* factory, Uint need, Uint xtra) +{ + Eterm* res; + if (factory->p) { + res = HAllocX(factory->p, need, xtra); + } else { + res = factory->hp; + factory->hp += need; + ASSERT(factory->hp <= factory->hp_end); + } + return res; +} + |