Sha256: 10f1ae6a7c6648082bbf7d02740f0ca419eefe7f4e413bd134aa8afaa8fb56ed

Contents?: true

Size: 1.33 KB

Versions: 10

Compression:

Stored size: 1.33 KB

Contents

#include "rr.h"

namespace rr {
  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) {
    return HeapStatistics(new v8::HeapStatistics());
  }
  VALUE HeapStatistics::total_heap_size(VALUE self) {
    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);
  }
}

Version data entries

10 entries across 10 versions & 6 rubygems

Version Path
arcabouco-0.2.13 vendor/bundle/gems/therubyracer-0.12.2/ext/v8/heap.cc
therubyracer-0.12.3 ext/v8/heap.cc
therubyracer-xcode-0.12.3 ext/v8/heap.cc
therubyracer-xcode-0.12.2 ext/v8/heap.cc
therubyracer-tmpfork-0.12.2 ext/v8/heap.cc
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/therubyracer-0.12.2/ext/v8/heap.cc
therubyracer-0.12.2 ext/v8/heap.cc
therubyracer-0.12.1 ext/v8/heap.cc
therubyracer-discourse-0.12.0 ext/v8/heap.cc
therubyracer-0.12.0 ext/v8/heap.cc