summaryrefslogtreecommitdiffstats
path: root/src/spaces.h
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2009-11-05 08:53:23 +0000
committerSteve Block <steveblock@google.com>2009-11-05 08:53:23 +0000
commit3ce2e2076e8e3e60cf1810eec160ea2d8557e9e7 (patch)
tree5f5d61c95b42f8e38a8a0c22cb7ad0506984d725 /src/spaces.h
parenta7e24c173cf37484693b9abb38e494fa7bd7baeb (diff)
downloadandroid_external_v8-3ce2e2076e8e3e60cf1810eec160ea2d8557e9e7.tar.gz
android_external_v8-3ce2e2076e8e3e60cf1810eec160ea2d8557e9e7.tar.bz2
android_external_v8-3ce2e2076e8e3e60cf1810eec160ea2d8557e9e7.zip
Update V8 to r3121 as required for WebKit update.
Change-Id: Ic53e0aef9a9eb9b71ee7d25a8aef61520bba899c
Diffstat (limited to 'src/spaces.h')
-rw-r--r--src/spaces.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/spaces.h b/src/spaces.h
index 76b88ef7..9e1d873c 100644
--- a/src/spaces.h
+++ b/src/spaces.h
@@ -862,6 +862,10 @@ class PagedSpace : public Space {
// Current capacity without growing (Size() + Available() + Waste()).
int Capacity() { return accounting_stats_.Capacity(); }
+ // Total amount of memory committed for this space. For paged
+ // spaces this equals the capacity.
+ int CommittedMemory() { return Capacity(); }
+
// Available bytes without growing.
int Available() { return accounting_stats_.Available(); }
@@ -1252,11 +1256,19 @@ class NewSpace : public Space {
// Return the allocated bytes in the active semispace.
virtual int Size() { return top() - bottom(); }
+
// Return the current capacity of a semispace.
int Capacity() {
ASSERT(to_space_.Capacity() == from_space_.Capacity());
return to_space_.Capacity();
}
+
+ // Return the total amount of memory committed for new space.
+ int CommittedMemory() {
+ if (from_space_.is_committed()) return 2 * Capacity();
+ return Capacity();
+ }
+
// Return the available bytes without growing in the active semispace.
int Available() { return Capacity() - Size(); }
@@ -1423,6 +1435,8 @@ class FreeListNode: public HeapObject {
return reinterpret_cast<FreeListNode*>(HeapObject::FromAddress(address));
}
+ static inline bool IsFreeListNode(HeapObject* object);
+
// Set the size in bytes, which can be read with HeapObject::Size(). This
// function also writes a map to the first word of the block so that it
// looks like a heap object to the garbage collector and heap iteration