1
0
Fork 0
mirror of https://github.com/rubyjs/therubyracer synced 2023-03-27 23:21:42 -04:00

expose HeapStatistics#total_physical_size()

This commit is contained in:
Charles Lowell 2013-03-28 08:34:41 -05:00
parent 3dc59496ee
commit eba917b9b2
2 changed files with 6 additions and 1 deletions

View file

@ -6,6 +6,7 @@ namespace rr {
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);
@ -19,6 +20,9 @@ namespace rr {
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());
}
@ -28,4 +32,4 @@ namespace rr {
template <> void Pointer<v8::HeapStatistics>::unwrap(VALUE value) {
Data_Get_Struct(value, class v8::HeapStatistics, pointer);
}
}
}

View file

@ -819,6 +819,7 @@ public:
static VALUE initialize(VALUE self);
static VALUE total_heap_size(VALUE self);
static VALUE total_heap_size_executable(VALUE self);
static VALUE total_physical_size(VALUE self);
static VALUE used_heap_size(VALUE self);
static VALUE heap_size_limit(VALUE self);