Chromium Code Reviews| Index: src/spaces.h |
| =================================================================== |
| --- src/spaces.h (revision 13384) |
| +++ src/spaces.h (working copy) |
| @@ -653,6 +653,11 @@ |
| static inline void UpdateHighWaterMark(Address mark); |
| + // Commit the delta memory region from area_end_ to area_start_ + body_size, |
|
danno
2013/01/17 10:49:55
Please don't include implementation details (e.g.
haitao.feng
2013/01/17 14:20:33
Done.
|
| + // If body_size <= area_end_ - area_start_, this function just returns true |
| + // and no uncommitment happens. |
|
danno
2013/01/17 10:49:55
s/area_end_ to area_start_/Pages are never uncommi
haitao.feng
2013/01/17 14:20:33
Done.
|
| + bool CommitBody(size_t body_size, Executability executable); |
| + |
| protected: |
| MemoryChunk* next_chunk_; |
| MemoryChunk* prev_chunk_; |
| @@ -888,7 +893,9 @@ |
| // the code range. On platforms with no separate code range, should |
| // not be called. |
| MUST_USE_RESULT Address AllocateRawMemory(const size_t requested, |
| - size_t* allocated); |
| + size_t* allocated, |
| + size_t commit_body_size); |
|
danno
2013/01/17 10:49:55
Can you make this the second parameter? Also, "bod
haitao.feng
2013/01/17 14:20:33
Done.
|
| + bool CommitRawMemory(Address start, size_t length); |
| void FreeRawMemory(Address buf, size_t length); |
| private: |
| @@ -1036,7 +1043,11 @@ |
| void ReportStatistics(); |
| #endif |
| - MemoryChunk* AllocateChunk(intptr_t body_size, |
| + // After calling this function, the memory region from commit_body_size to |
| + // reserve_body_size of the body is reserved but not committed, they could be |
| + // 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); |
| @@ -1045,6 +1056,7 @@ |
| VirtualMemory* controller); |
| Address AllocateAlignedMemory(size_t requested, |
|
danno
2013/01/17 10:49:55
"requested_size" should be first parameter, second
haitao.feng
2013/01/17 14:20:33
Done.
|
| size_t alignment, |
| + size_t commit_body_size, |
| Executability executable, |
| VirtualMemory* controller); |
| @@ -1095,7 +1107,8 @@ |
| MUST_USE_RESULT static bool CommitCodePage(VirtualMemory* vm, |
| Address start, |
| - size_t size); |
| + size_t size, |
| + size_t body_size); |
| private: |
| Isolate* isolate_; |