Index: runtime/vm/freelist.h |
=================================================================== |
--- runtime/vm/freelist.h (revision 32487) |
+++ runtime/vm/freelist.h (working copy) |
@@ -19,9 +19,15 @@ |
// the element at the address following the next_ field. |
class FreeListElement { |
public: |
+ // Maximum header size is three words (tags, next, and size). |
+ static const intptr_t kHeaderSize = 3 * kWordSize; |
+ |
FreeListElement* next() const { |
return next_; |
} |
+ uword next_address() const { |
+ return reinterpret_cast<uword>(&next_); |
+ } |
void set_next(FreeListElement* next) { |
next_ = next; |
@@ -75,7 +81,7 @@ |
FreeList(); |
~FreeList(); |
- uword TryAllocate(intptr_t size); |
+ uword TryAllocate(intptr_t size, bool is_protected); |
void Free(uword addr, intptr_t size); |
void Reset(); |
@@ -92,7 +98,9 @@ |
void EnqueueElement(FreeListElement* element, intptr_t index); |
FreeListElement* DequeueElement(intptr_t index); |
- void SplitElementAfterAndEnqueue(FreeListElement* element, intptr_t size); |
+ void SplitElementAfterAndEnqueue(FreeListElement* element, |
+ intptr_t size, |
+ bool is_protected); |
void PrintSmall() const; |
void PrintLarge() const; |