Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(665)

Unified Diff: runtime/vm/freelist.h

Issue 136563002: Landing: Write protect executable pages in the VM. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/debugger_x64.cc ('k') | runtime/vm/freelist.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « runtime/vm/debugger_x64.cc ('k') | runtime/vm/freelist.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698