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

Unified Diff: src/spaces.h

Issue 11566011: Use MemoryChunk-based allocation for deoptimization entry code (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 7 years, 11 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 | « src/deoptimizer.cc ('k') | src/spaces.cc » ('j') | src/spaces.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/spaces.h
===================================================================
--- src/spaces.h (revision 13384)
+++ src/spaces.h (working copy)
@@ -653,6 +653,10 @@
static inline void UpdateHighWaterMark(Address mark);
+ // Commit chunk body up to the body_size. If body_size is within the
+ // committed size, the committed pages are never uncommitted.
danno 2013/01/17 16:00:55 Why not uncommit? It seems to me that uncommitting
haitao.feng 2013/01/18 12:59:26 Done.
+ bool CommitBody(size_t body_size, Executability executable);
+
protected:
MemoryChunk* next_chunk_;
MemoryChunk* prev_chunk_;
@@ -887,8 +891,10 @@
// Allocates a chunk of memory from the large-object portion of
// the code range. On platforms with no separate code range, should
// not be called.
- MUST_USE_RESULT Address AllocateRawMemory(const size_t requested,
+ MUST_USE_RESULT Address AllocateRawMemory(const size_t requested_size,
+ const size_t commit_size,
size_t* allocated);
+ bool CommitRawMemory(Address start, size_t length);
void FreeRawMemory(Address buf, size_t length);
private:
@@ -1036,14 +1042,19 @@
void ReportStatistics();
#endif
- MemoryChunk* AllocateChunk(intptr_t body_size,
+ // After calling this function, the memory region from commit_body_size to
danno 2013/01/17 16:00:55 How about just: // Returns a MemoryChunk in which
haitao.feng 2013/01/18 12:59:26 Done.
+ // reserve_body_size of the body is reserved but not committed, they could be
danno 2013/01/17 16:00:55 nit: s/they could/it could/
haitao.feng 2013/01/18 12:59:26 Done.
+ // committed later by calling MemoryChunk::CommitBody with a new body size.
+ MemoryChunk* AllocateChunk(intptr_t reserve_body_size,
+ intptr_t commit_body_size,
Executability executable,
Space* space);
Address ReserveAlignedMemory(size_t requested,
size_t alignment,
VirtualMemory* controller);
- Address AllocateAlignedMemory(size_t requested,
+ Address AllocateAlignedMemory(size_t requested_size,
danno 2013/01/17 16:00:55 s/requested_size/reserve_size/
haitao.feng 2013/01/18 12:59:26 Done.
+ size_t commit_size,
size_t alignment,
Executability executable,
VirtualMemory* controller);
@@ -1093,9 +1104,10 @@
return CodePageAreaEndOffset() - CodePageAreaStartOffset();
}
- MUST_USE_RESULT static bool CommitCodePage(VirtualMemory* vm,
- Address start,
- size_t size);
+ MUST_USE_RESULT static bool CommitExecutableMemory(VirtualMemory* vm,
+ Address start,
+ size_t commit_size,
+ size_t reserved_size);
private:
Isolate* isolate_;
« no previous file with comments | « src/deoptimizer.cc ('k') | src/spaces.cc » ('j') | src/spaces.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698