[heap] Skip global memory check for starting GC from a background thread
Currently background thread cannot allocate embedder objects and checking the embedder heap size is not thread-safe. For simplicity, we can skip the check until concurrent allocation of embedder objects is supported. Bug: chromium:1162744, chromium:1160097 Change-Id: I47d6299e77b986e4b2cb8da841e0149ef577918a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2640477 Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#72204}
This commit is contained in:
parent
af7e68931f
commit
e4bc1efeb9
@ -1793,12 +1793,8 @@ void Heap::StartIncrementalMarkingIfAllocationLimitIsReachedBackground() {
|
||||
}
|
||||
|
||||
const size_t old_generation_space_available = OldGenerationSpaceAvailable();
|
||||
const base::Optional<size_t> global_memory_available =
|
||||
GlobalMemoryAvailable();
|
||||
|
||||
if (old_generation_space_available < new_space_->Capacity() ||
|
||||
(global_memory_available &&
|
||||
*global_memory_available < new_space_->Capacity())) {
|
||||
if (old_generation_space_available < new_space_->Capacity()) {
|
||||
incremental_marking()->incremental_marking_job()->ScheduleTask(this);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user