aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/utils.c
diff options
context:
space:
mode:
authorPatrik Nyblom <pan@erlang.org>2013-06-11 14:50:00 +0200
committerPatrik Nyblom <pan@erlang.org>2013-06-11 14:50:00 +0200
commit5dd13b1efead2a8101ff1fb46937fbfa00db5269 (patch)
treedd1de1385b7648e639614909e139ff86f92aff71 /erts/emulator/beam/utils.c
parentfdd8705381fb3accd2c9becea902fe8754bbb0ec (diff)
parentc013f8b647c29a41f351a91825906861f01d13ca (diff)
downloadotp-5dd13b1efead2a8101ff1fb46937fbfa00db5269.tar.gz
otp-5dd13b1efead2a8101ff1fb46937fbfa00db5269.tar.bz2
otp-5dd13b1efead2a8101ff1fb46937fbfa00db5269.zip
Merge branch 'pan/happi/yield_in_term_to_binary' into maintOTP_R16B01_RC1
* pan/happi/yield_in_term_to_binary: Add testcase to stress extra_root term_to_binary: Remove debug code and set production trap levels Teach erl_gc:offset_rootset about extra_root Teach external.c to handle reallocs before compression Make all steps ofterm_to_binary work in chunks and yield Make term_to_binary yield (trap). OTP-11163
Diffstat (limited to 'erts/emulator/beam/utils.c')
-rw-r--r--erts/emulator/beam/utils.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/erts/emulator/beam/utils.c b/erts/emulator/beam/utils.c
index 0a833f7e66..62caa67ce1 100644
--- a/erts/emulator/beam/utils.c
+++ b/erts/emulator/beam/utils.c
@@ -185,15 +185,15 @@ erts_set_hole_marker(Eterm* ptr, Uint sz)
* Helper function for the ESTACK macros defined in global.h.
*/
void
-erl_grow_stack(Eterm** start, Eterm** sp, Eterm** end)
+erl_grow_stack(ErtsAlcType_t a_type, Eterm** start, Eterm** sp, Eterm** end)
{
Uint old_size = (*end - *start);
Uint new_size = old_size * 2;
Uint sp_offs = *sp - *start;
if (new_size > 2 * DEF_ESTACK_SIZE) {
- *start = erts_realloc(ERTS_ALC_T_ESTACK, (void *) *start, new_size*sizeof(Eterm));
+ *start = erts_realloc(a_type, (void *) *start, new_size*sizeof(Eterm));
} else {
- Eterm* new_ptr = erts_alloc(ERTS_ALC_T_ESTACK, new_size*sizeof(Eterm));
+ Eterm* new_ptr = erts_alloc(a_type, new_size*sizeof(Eterm));
sys_memcpy(new_ptr, *start, old_size*sizeof(Eterm));
*start = new_ptr;
}
@@ -204,15 +204,15 @@ erl_grow_stack(Eterm** start, Eterm** sp, Eterm** end)
* Helper function for the ESTACK macros defined in global.h.
*/
void
-erl_grow_wstack(UWord** start, UWord** sp, UWord** end)
+erl_grow_wstack(ErtsAlcType_t a_type, UWord** start, UWord** sp, UWord** end)
{
Uint old_size = (*end - *start);
Uint new_size = old_size * 2;
Uint sp_offs = *sp - *start;
if (new_size > 2 * DEF_ESTACK_SIZE) {
- *start = erts_realloc(ERTS_ALC_T_ESTACK, (void *) *start, new_size*sizeof(UWord));
+ *start = erts_realloc(a_type, (void *) *start, new_size*sizeof(UWord));
} else {
- UWord* new_ptr = erts_alloc(ERTS_ALC_T_ESTACK, new_size*sizeof(UWord));
+ UWord* new_ptr = erts_alloc(a_type, new_size*sizeof(UWord));
sys_memcpy(new_ptr, *start, old_size*sizeof(UWord));
*start = new_ptr;
}