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

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/isolate.h ('k') | src/spaces.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/spaces.h
===================================================================
--- src/spaces.h (revision 13522)
+++ src/spaces.h (working copy)
@@ -645,6 +645,7 @@
int area_size() {
return static_cast<int>(area_end() - area_start());
}
+ bool CommitArea(size_t requested);
// Approximate amount of physical memory committed for this chunk.
size_t CommittedPhysicalMemory() {
@@ -887,8 +888,11 @@
// 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);
+ bool UncommitRawMemory(Address start, size_t length);
void FreeRawMemory(Address buf, size_t length);
private:
@@ -1036,14 +1040,19 @@
void ReportStatistics();
#endif
- MemoryChunk* AllocateChunk(intptr_t body_size,
+ // Returns a MemoryChunk in which the memory region from commit_area_size to
+ // reserve_area_size of the chunk area is reserved but not committed, it
+ // could be committed later by calling MemoryChunk::CommitArea.
+ MemoryChunk* AllocateChunk(intptr_t reserve_area_size,
+ intptr_t commit_area_size,
Executability executable,
Space* space);
Address ReserveAlignedMemory(size_t requested,
size_t alignment,
VirtualMemory* controller);
- Address AllocateAlignedMemory(size_t requested,
+ Address AllocateAlignedMemory(size_t reserve_size,
+ size_t commit_size,
size_t alignment,
Executability executable,
VirtualMemory* controller);
@@ -1093,9 +1102,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/isolate.h ('k') | src/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698