| Index: src/heap.cc
|
| diff --git a/src/heap.cc b/src/heap.cc
|
| index 82e0965e9f83dcfefc8327099041a7403b22e29c..4f29ed0b8378aa0b21cba796cf9e8a0b90cab3f5 100644
|
| --- a/src/heap.cc
|
| +++ b/src/heap.cc
|
| @@ -604,28 +604,29 @@ void Heap::ReserveSpace(
|
| gc_performed = true;
|
| }
|
| if (!old_pointer_space->ReserveSpace(pointer_space_size)) {
|
| - Heap::CollectGarbage(OLD_POINTER_SPACE,
|
| - "failed to reserve space in the old pointer space");
|
| + Heap::AbortIncrementalMarkingAndCollectGarbage(
|
| + OLD_POINTER_SPACE,
|
| + "failed to reserve space in the old pointer space");
|
| gc_performed = true;
|
| }
|
| if (!(old_data_space->ReserveSpace(data_space_size))) {
|
| - Heap::CollectGarbage(OLD_DATA_SPACE,
|
| - "failed to reserve space in the old data space");
|
| + Heap::AbortIncrementalMarkingAndCollectGarbage(
|
| + OLD_DATA_SPACE, "failed to reserve space in the old data space");
|
| gc_performed = true;
|
| }
|
| if (!(code_space->ReserveSpace(code_space_size))) {
|
| - Heap::CollectGarbage(CODE_SPACE,
|
| - "failed to reserve space in the code space");
|
| + Heap::AbortIncrementalMarkingAndCollectGarbage(
|
| + CODE_SPACE, "failed to reserve space in the code space");
|
| gc_performed = true;
|
| }
|
| if (!(map_space->ReserveSpace(map_space_size))) {
|
| - Heap::CollectGarbage(MAP_SPACE,
|
| - "failed to reserve space in the map space");
|
| + Heap::AbortIncrementalMarkingAndCollectGarbage(
|
| + MAP_SPACE, "failed to reserve space in the map space");
|
| gc_performed = true;
|
| }
|
| if (!(cell_space->ReserveSpace(cell_space_size))) {
|
| - Heap::CollectGarbage(CELL_SPACE,
|
| - "failed to reserve space in the cell space");
|
| + Heap::AbortIncrementalMarkingAndCollectGarbage(
|
| + CELL_SPACE, "failed to reserve space in the cell space");
|
| gc_performed = true;
|
| }
|
| // We add a slack-factor of 2 in order to have space for a series of
|
| @@ -637,8 +638,8 @@ void Heap::ReserveSpace(
|
| large_object_size += cell_space_size + map_space_size + code_space_size +
|
| data_space_size + pointer_space_size;
|
| if (!(lo_space->ReserveSpace(large_object_size))) {
|
| - Heap::CollectGarbage(LO_SPACE,
|
| - "failed to reserve space in the large object space");
|
| + Heap::AbortIncrementalMarkingAndCollectGarbage(
|
| + LO_SPACE, "failed to reserve space in the large object space");
|
| gc_performed = true;
|
| }
|
| }
|
|
|