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

Unified Diff: src/spaces.cc

Issue 7572018: Minimize malloc heap allocation on process startup. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 4 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/spaces.h ('k') | test/cctest/test-alloc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/spaces.cc
diff --git a/src/spaces.cc b/src/spaces.cc
index 54361da88acdd8195ffbada0239a9c3f0416a4a7..a782ba98cafc8fc48186f7e1b4657c264bec2d09 100644
--- a/src/spaces.cc
+++ b/src/spaces.cc
@@ -148,12 +148,12 @@ PageIterator::PageIterator(PagedSpace* space, Mode mode) : space_(space) {
// CodeRange
-CodeRange::CodeRange()
- : code_range_(NULL),
+CodeRange::CodeRange(Isolate* isolate)
+ : isolate_(isolate),
+ code_range_(NULL),
free_list_(0),
allocation_list_(0),
- current_allocation_block_index_(0),
- isolate_(NULL) {
+ current_allocation_block_index_(0) {
}
@@ -279,8 +279,9 @@ void CodeRange::TearDown() {
const int kEstimatedNumberOfChunks = 270;
-MemoryAllocator::MemoryAllocator()
- : capacity_(0),
+MemoryAllocator::MemoryAllocator(Isolate* isolate)
+ : isolate_(isolate),
+ capacity_(0),
capacity_executable_(0),
size_(0),
size_executable_(0),
@@ -288,8 +289,7 @@ MemoryAllocator::MemoryAllocator()
chunks_(kEstimatedNumberOfChunks),
free_chunk_ids_(kEstimatedNumberOfChunks),
max_nof_chunks_(0),
- top_(0),
- isolate_(NULL) {
+ top_(0) {
}
« no previous file with comments | « src/spaces.h ('k') | test/cctest/test-alloc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698