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

Side by Side Diff: src/spaces.h

Issue 208057: Push memory reduction changes to 1.2 branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/1.2/
Patch Set: Created 11 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/heap.cc ('k') | src/version.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 static inline void UnprotectChunkFromPage(Page* page); 425 static inline void UnprotectChunkFromPage(Page* page);
426 #endif 426 #endif
427 427
428 #ifdef DEBUG 428 #ifdef DEBUG
429 // Reports statistic info of the space. 429 // Reports statistic info of the space.
430 static void ReportStatistics(); 430 static void ReportStatistics();
431 #endif 431 #endif
432 432
433 // Due to encoding limitation, we can only have 8K chunks. 433 // Due to encoding limitation, we can only have 8K chunks.
434 static const int kMaxNofChunks = 1 << Page::kPageSizeBits; 434 static const int kMaxNofChunks = 1 << Page::kPageSizeBits;
435 // If a chunk has at least 32 pages, the maximum heap size is about 435 // If a chunk has at least 16 pages, the maximum heap size is about
436 // 8 * 1024 * 32 * 8K = 2G bytes. 436 // 8k * 8K * 16 = 1G bytes.
437 static const int kPagesPerChunk = 64; 437 #ifdef V8_TARGET_ARCH_X64
438 static const int kPagesPerChunk = 32;
439 #else
440 static const int kPagesPerChunk = 16;
441 #endif
438 static const int kChunkSize = kPagesPerChunk * Page::kPageSize; 442 static const int kChunkSize = kPagesPerChunk * Page::kPageSize;
439 443
440 private: 444 private:
441 // Maximum space size in bytes. 445 // Maximum space size in bytes.
442 static int capacity_; 446 static int capacity_;
443 447
444 // Allocated space size in bytes. 448 // Allocated space size in bytes.
445 static int size_; 449 static int size_;
446 450
447 // The initial chunk of virtual memory. 451 // The initial chunk of virtual memory.
(...skipping 1344 matching lines...) Expand 10 before | Expand all | Expand 10 after
1792 1796
1793 private: 1797 private:
1794 LargeObjectChunk* current_; 1798 LargeObjectChunk* current_;
1795 HeapObjectCallback size_func_; 1799 HeapObjectCallback size_func_;
1796 }; 1800 };
1797 1801
1798 1802
1799 } } // namespace v8::internal 1803 } } // namespace v8::internal
1800 1804
1801 #endif // V8_SPACES_H_ 1805 #endif // V8_SPACES_H_
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698