Index: runtime/vm/freelist.h |
diff --git a/runtime/vm/freelist.h b/runtime/vm/freelist.h |
index 8ec1ac45e8d90c880ab6f18d94186d5509fa9c03..9bed00ee4dbe89d3288578c806f10f7d9d12c52b 100644 |
--- a/runtime/vm/freelist.h |
+++ b/runtime/vm/freelist.h |
@@ -19,9 +19,15 @@ namespace dart { |
// 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 @@ class FreeList { |
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 @@ class FreeList { |
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; |