Chromium Code Reviews| Index: src/heap/heap.h |
| diff --git a/src/heap/heap.h b/src/heap/heap.h |
| index 742aa4ba89c0c3535e7a3c7d8ab0b473479e2544..aed5b9282915570ff5df135bb6b17be0622f4306 100644 |
| --- a/src/heap/heap.h |
| +++ b/src/heap/heap.h |
| @@ -716,13 +716,19 @@ class Heap { |
| MUST_USE_RESULT AllocationResult |
| CopyJSObject(JSObject* source, AllocationSite* site = NULL); |
|
Hannes Payer (out of office)
2015/05/26 09:22:29
Please add comments about what these functions are
bbudge
2015/05/26 11:09:18
Done.
|
| - // This method assumes overallocation of one word. It will store a filler |
| - // before the object if the given object is not double aligned, otherwise |
| - // it will place the filler after the object. |
| - MUST_USE_RESULT HeapObject* EnsureAligned(HeapObject* object, int size, |
| - AllocationAlignment alignment); |
| - |
| - MUST_USE_RESULT HeapObject* PrecedeWithFiller(HeapObject* object); |
| + static int GetMaximumFillToAlign(AllocationAlignment alignment); |
| + static int GetFillToAlign(Address address, AllocationAlignment alignment); |
| + |
| + // Creates a filler object and returns a heap object immediately after it. |
| + MUST_USE_RESULT HeapObject* PrecedeWithFiller(HeapObject* object, |
| + int filler_size); |
| + // Creates a filler object if needed for alignment and returns a heap object |
| + // immediately after it. If any space is left after the returned object, |
| + // another filler object is created so the over allocated memory is iterable. |
| + MUST_USE_RESULT HeapObject* AlignWithFiller(HeapObject* object, |
| + int object_size, |
| + int allocation_size, |
| + AllocationAlignment alignment); |
| // Clear the Instanceof cache (used when a prototype changes). |
| inline void ClearInstanceofCache(); |