Chromium Code Reviews| Index: src/heap/spaces.h |
| diff --git a/src/heap/spaces.h b/src/heap/spaces.h |
| index b8fc9b7efe0845d4852b6660c8465abdda18f115..58c619029d61b8092f874f20cd8cd107df069c50 100644 |
| --- a/src/heap/spaces.h |
| +++ b/src/heap/spaces.h |
| @@ -1631,6 +1631,11 @@ class FreeList { |
| intptr_t Concatenate(FreeList* free_list); |
| + // Divide {this} free lists up among {other_free_lists} up to some certain |
| + // {limit} of bytes. Note that this operation needs to iterate over nodes |
| + // one-by-one, making it a potentially slow operation. |
| + void Divide(FreeList** other_free_lists, int num, intptr_t limit); |
| + |
| // Clear the free list. |
| void Reset(); |
| @@ -1997,6 +2002,14 @@ class PagedSpace : public Space { |
| virtual bool is_local() { return false; } |
| + // Adds external memory starting at {start} of {size_in_bytes} to the space. |
| + void AddExternalMemory(Address start, int size_in_bytes) { |
|
Hannes Payer (out of office)
2015/09/23 08:47:22
Call it AddMemory, to get the naming in sync with
|
| + IncreaseCapacity(size_in_bytes); |
| + Free(start, size_in_bytes); |
| + } |
| + |
| + void RemoveMemory(int size) { accounting_stats_.DecreaseCapacity(size); } |
|
Hannes Payer (out of office)
2015/09/23 08:47:22
To make this one dual with AddMemory, it should ac
Michael Lippautz
2015/09/23 11:49:01
Done.
|
| + |
| protected: |
| // PagedSpaces that should be included in snapshots have different, i.e., |
| // smaller, initial pages. |
| @@ -2744,12 +2757,6 @@ class CompactionSpace : public PagedSpace { |
| CompactionSpace(Heap* heap, AllocationSpace id, Executability executable) |
| : PagedSpace(heap, id, executable) {} |
| - // Adds external memory starting at {start} of {size_in_bytes} to the space. |
| - void AddExternalMemory(Address start, int size_in_bytes) { |
| - IncreaseCapacity(size_in_bytes); |
| - Free(start, size_in_bytes); |
| - } |
| - |
| virtual bool is_local() { return true; } |
| protected: |