Commit 5344fe51 authored by jochen's avatar jochen Committed by Commit bot

Revert of Let GC select the collector when the external memory allocation...

Revert of Let GC select the collector when the external memory allocation limit is reached (patchset #1 id:1 of https://codereview.chromium.org/1201993002/)

Reason for revert:
results in a scavenge storm if scavenge doesn't free enough memory

Original issue's description:
> Let GC select the collector when the external memory allocation limit is reached
>
> BUG=none
> R=hpayer@chromium.org
> LOG=n
>
> Committed: https://crrev.com/93d6216099b60e95bc816bcc913f8f841ee795b6
> Cr-Commit-Position: refs/heads/master@{#29235}

TBR=hpayer@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=none

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

Cr-Commit-Position: refs/heads/master@{#29383}
parent 0bf9305a
...@@ -5937,7 +5937,7 @@ class V8_EXPORT Isolate { ...@@ -5937,7 +5937,7 @@ class V8_EXPORT Isolate {
void SetObjectGroupId(internal::Object** object, UniqueId id); void SetObjectGroupId(internal::Object** object, UniqueId id);
void SetReferenceFromGroup(UniqueId id, internal::Object** object); void SetReferenceFromGroup(UniqueId id, internal::Object** object);
void SetReference(internal::Object** parent, internal::Object** child); void SetReference(internal::Object** parent, internal::Object** child);
void CollectGarbage(const char* gc_reason); void CollectAllGarbage(const char* gc_reason);
}; };
class V8_EXPORT StartupData { class V8_EXPORT StartupData {
...@@ -8177,7 +8177,7 @@ int64_t Isolate::AdjustAmountOfExternalAllocatedMemory( ...@@ -8177,7 +8177,7 @@ int64_t Isolate::AdjustAmountOfExternalAllocatedMemory(
if (change_in_bytes > 0 && if (change_in_bytes > 0 &&
amount - *amount_of_external_allocated_memory_at_last_global_gc > amount - *amount_of_external_allocated_memory_at_last_global_gc >
I::kExternalAllocationLimit) { I::kExternalAllocationLimit) {
CollectGarbage("external memory allocation limit reached."); CollectAllGarbage("external memory allocation limit reached.");
} }
*amount_of_external_allocated_memory = amount; *amount_of_external_allocated_memory = amount;
return *amount_of_external_allocated_memory; return *amount_of_external_allocated_memory;
......
...@@ -6974,9 +6974,9 @@ Local<Integer> v8::Integer::NewFromUnsigned(Isolate* isolate, uint32_t value) { ...@@ -6974,9 +6974,9 @@ Local<Integer> v8::Integer::NewFromUnsigned(Isolate* isolate, uint32_t value) {
} }
void Isolate::CollectGarbage(const char* gc_reason) { void Isolate::CollectAllGarbage(const char* gc_reason) {
reinterpret_cast<i::Isolate*>(this)->heap()->CollectGarbage(i::NEW_SPACE, reinterpret_cast<i::Isolate*>(this)->heap()->CollectAllGarbage(
gc_reason); i::Heap::kNoGCFlags, 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