Commit 93d62160 authored by jochen's avatar jochen Committed by Commit bot

Let GC select the collector when the external memory allocation limit is reached

BUG=none
R=hpayer@chromium.org
LOG=n

Review URL: https://codereview.chromium.org/1201993002

Cr-Commit-Position: refs/heads/master@{#29235}
parent b76cf1f8
......@@ -5923,7 +5923,7 @@ class V8_EXPORT Isolate {
void SetObjectGroupId(internal::Object** object, UniqueId id);
void SetReferenceFromGroup(UniqueId id, internal::Object** object);
void SetReference(internal::Object** parent, internal::Object** child);
void CollectAllGarbage(const char* gc_reason);
void CollectGarbage(const char* gc_reason);
};
class V8_EXPORT StartupData {
......@@ -8163,7 +8163,7 @@ int64_t Isolate::AdjustAmountOfExternalAllocatedMemory(
if (change_in_bytes > 0 &&
amount - *amount_of_external_allocated_memory_at_last_global_gc >
I::kExternalAllocationLimit) {
CollectAllGarbage("external memory allocation limit reached.");
CollectGarbage("external memory allocation limit reached.");
}
*amount_of_external_allocated_memory = amount;
return *amount_of_external_allocated_memory;
......
......@@ -6866,9 +6866,9 @@ Local<Integer> v8::Integer::NewFromUnsigned(Isolate* isolate, uint32_t value) {
}
void Isolate::CollectAllGarbage(const char* gc_reason) {
reinterpret_cast<i::Isolate*>(this)->heap()->CollectAllGarbage(
i::Heap::kNoGCFlags, gc_reason);
void Isolate::CollectGarbage(const char* gc_reason) {
reinterpret_cast<i::Isolate*>(this)->heap()->CollectGarbage(i::NEW_SPACE,
gc_reason);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment