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

Unified Diff: src/spaces-inl.h

Issue 10096005: A very small marking bitmap (2 bits) is sufficient for large object page since just one object in i… Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 8 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.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/spaces-inl.h
===================================================================
--- src/spaces-inl.h (revision 11322)
+++ src/spaces-inl.h (working copy)
@@ -39,6 +39,15 @@
// -----------------------------------------------------------------------------
// Bitmap
+int Bitmap::CellsCount() {
+ MemoryChunk* chunk = MemoryChunk::FromAddress(address());
+ ASSERT(chunk->is_valid());
+ size_t rLength = (chunk->area_start() - address()) << kBitsPerByteLog2;
+ if (rLength > kLength) rLength = kLength;
+ rLength &= ~(kBitsPerCell - 1);
+ return CellsForLength(rLength);
+}
+
void Bitmap::Clear(MemoryChunk* chunk) {
Bitmap* bitmap = chunk->markbits();
for (int i = 0; i < bitmap->CellsCount(); i++) bitmap->cells()[i] = 0;
« no previous file with comments | « src/spaces.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698