diff options
author | Rickard Green <[email protected]> | 2011-02-25 12:26:47 +0100 |
---|---|---|
committer | Rickard Green <[email protected]> | 2011-02-25 12:26:47 +0100 |
commit | 36fedbaec633e6afbe35877a688ac1a95516cdd4 (patch) | |
tree | 958dc7954e6776e385b0c6dd6f19a23dcd06b0de /erts/emulator/beam/erl_process.c | |
parent | f36365ab30f9e2811e8d9e2fc342bb1f4eac45ed (diff) | |
parent | 96effb9c1115f7a168d4db625726c738240d4c9b (diff) | |
download | otp-36fedbaec633e6afbe35877a688ac1a95516cdd4.tar.gz otp-36fedbaec633e6afbe35877a688ac1a95516cdd4.tar.bz2 otp-36fedbaec633e6afbe35877a688ac1a95516cdd4.zip |
Merge branch 'rickard/temp_alloc_check/OTP-9028' into dev
* rickard/temp_alloc_check/OTP-9028:
Verify that temp allocated memory is released
Diffstat (limited to 'erts/emulator/beam/erl_process.c')
-rw-r--r-- | erts/emulator/beam/erl_process.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c index ddfc27a93f..e4a871fd7e 100644 --- a/erts/emulator/beam/erl_process.c +++ b/erts/emulator/beam/erl_process.c @@ -2752,6 +2752,15 @@ erts_init_scheduling(int mrq, int no_schedulers, int no_schedulers_online) /* init port tasks */ erts_port_task_init(); + +#ifndef ERTS_SMP +#ifdef ERTS_DO_VERIFY_UNUSED_TEMP_ALLOC + erts_scheduler_data->verify_unused_temp_alloc + = erts_alloc_get_verify_unused_temp_alloc( + &erts_scheduler_data->verify_unused_temp_alloc_data); + ERTS_VERIFY_UNUSED_TEMP_ALLOC(NULL); +#endif +#endif } ErtsRunQueue * @@ -3711,6 +3720,13 @@ sched_thread_func(void *vesdp) } erts_smp_mtx_unlock(&schdlr_sspnd.mtx); +#ifdef ERTS_DO_VERIFY_UNUSED_TEMP_ALLOC + ((ErtsSchedulerData *) vesdp)->verify_unused_temp_alloc + = erts_alloc_get_verify_unused_temp_alloc( + &((ErtsSchedulerData *) vesdp)->verify_unused_temp_alloc_data); + ERTS_VERIFY_UNUSED_TEMP_ALLOC(NULL); +#endif + process_main(); /* No schedulers should *ever* terminate */ erl_exit(ERTS_ABORT_EXIT, "Scheduler thread number %bpu terminated\n", |