[heap] print useful message when heap init fails.
R=ulan@chromium.org This is in response to https: //github.com/nodejs/node/issues/16901 Change-Id: I78fd5ea5b1d5602c4e48b985189e1b4114ff6443 Reviewed-on: https://chromium-review.googlesource.com/758680 Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Yang Guo <yangguo@chromium.org> Cr-Commit-Position: refs/heads/master@{#49340}
This commit is contained in:
parent
88a2b1ee98
commit
8b54fec88f
@ -1469,6 +1469,11 @@ bool Heap::ReserveSpace(Reservation* reservations, std::vector<Address>* maps) {
|
||||
}
|
||||
}
|
||||
if (perform_gc) {
|
||||
// We cannot perfom a GC with an uninitialized isolate. This check
|
||||
// fails for example if the max old space size is chosen unwisely,
|
||||
// so that we cannot allocate space to deserialize the initial heap.
|
||||
CHECK_WITH_MSG(deserialization_complete_,
|
||||
"insufficient memory to create an Isolate");
|
||||
if (space == NEW_SPACE) {
|
||||
CollectGarbage(NEW_SPACE, GarbageCollectionReason::kDeserializer);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user