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

Unified Diff: src/heap/spaces.h

Issue 1991253002: [heap] Bundle platform-specific constants for CodeRange (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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/heap/heap.cc ('k') | src/heap/spaces.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/spaces.h
diff --git a/src/heap/spaces.h b/src/heap/spaces.h
index 67e9aae114326e8a57f55751115c063882b30712..9a7b8a5f2767766c7a2338e96f0ac5ffebfe2be3 100644
--- a/src/heap/spaces.h
+++ b/src/heap/spaces.h
@@ -1154,15 +1154,6 @@ class CodeRange {
void FreeRawMemory(Address buf, size_t length);
private:
- // Frees the range of virtual memory, and frees the data structures used to
- // manage it.
- void TearDown();
-
- Isolate* isolate_;
-
- // The reserved range of virtual memory that all code objects are put in.
- base::VirtualMemory* code_range_;
- // Plain old data class, just a struct plus a constructor.
class FreeBlock {
public:
FreeBlock() : start(0), size(0) {}
@@ -1181,6 +1172,26 @@ class CodeRange {
size_t size;
};
+ // Frees the range of virtual memory, and frees the data structures used to
+ // manage it.
+ void TearDown();
+
+ // Finds a block on the allocation list that contains at least the
+ // requested amount of memory. If none is found, sorts and merges
+ // the existing free memory blocks, and searches again.
+ // If none can be found, returns false.
+ bool GetNextAllocationBlock(size_t requested);
+ // Compares the start addresses of two free blocks.
+ static int CompareFreeBlockAddress(const FreeBlock* left,
+ const FreeBlock* right);
+ bool ReserveBlock(const size_t requested_size, FreeBlock* block);
+ void ReleaseBlock(const FreeBlock* block);
+
+ Isolate* isolate_;
+
+ // The reserved range of virtual memory that all code objects are put in.
+ base::VirtualMemory* code_range_;
+
// The global mutex guards free_list_ and allocation_list_ as GC threads may
// access both lists concurrently to the main thread.
base::Mutex code_range_mutex_;
@@ -1195,17 +1206,6 @@ class CodeRange {
List<FreeBlock> allocation_list_;
int current_allocation_block_index_;
- // Finds a block on the allocation list that contains at least the
- // requested amount of memory. If none is found, sorts and merges
- // the existing free memory blocks, and searches again.
- // If none can be found, returns false.
- bool GetNextAllocationBlock(size_t requested);
- // Compares the start addresses of two free blocks.
- static int CompareFreeBlockAddress(const FreeBlock* left,
- const FreeBlock* right);
- bool ReserveBlock(const size_t requested_size, FreeBlock* block);
- void ReleaseBlock(const FreeBlock* block);
-
DISALLOW_COPY_AND_ASSIGN(CodeRange);
};
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698