ext/v8/heap.cc in therubyracer-0.11.4 vs ext/v8/heap.cc in therubyracer-0.12.0
- old
+ new
@@ -4,10 +4,11 @@
void HeapStatistics::Init() {
ClassBuilder("HeapStatistics").
defineSingletonMethod("new", &initialize).
defineMethod("total_heap_size", &total_heap_size).
defineMethod("total_heap_size_executable", &total_heap_size_executable).
+ defineMethod("total_physical_size", &total_physical_size).
defineMethod("used_heap_size", &used_heap_size).
defineMethod("heap_size_limit", &heap_size_limit).
store(&Class);
}
VALUE HeapStatistics::initialize(VALUE self) {
@@ -17,15 +18,18 @@
return SIZET2NUM(HeapStatistics(self)->total_heap_size());
}
VALUE HeapStatistics::total_heap_size_executable(VALUE self) {
return SIZET2NUM(HeapStatistics(self)->total_heap_size_executable());
}
+ VALUE HeapStatistics::total_physical_size(VALUE self) {
+ return SIZET2NUM(HeapStatistics(self)->total_physical_size());
+ }
VALUE HeapStatistics::used_heap_size(VALUE self) {
return SIZET2NUM(HeapStatistics(self)->used_heap_size());
}
VALUE HeapStatistics::heap_size_limit(VALUE self) {
return SIZET2NUM(HeapStatistics(self)->heap_size_limit());
}
template <> void Pointer<v8::HeapStatistics>::unwrap(VALUE value) {
Data_Get_Struct(value, class v8::HeapStatistics, pointer);
}
-}
\ No newline at end of file
+}