mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
Handle oom explicitly
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
This commit is contained in:
parent
166fa7c66b
commit
c02c6595be
1 changed files with 6 additions and 0 deletions
|
|
@ -41,6 +41,12 @@ void Heap::initialize()
|
|||
GC_set_warn_proc(GC_ignore_warn_proc);
|
||||
#endif
|
||||
|
||||
GC_set_oom_fn([](size_t sz) -> void* {
|
||||
ESCARGOT_LOG_ERROR("Out of memory!");
|
||||
abort();
|
||||
return nullptr;
|
||||
});
|
||||
|
||||
GC_set_force_unmap_on_gcollect(1);
|
||||
initializeCustomAllocators();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue