Sha256: deaab7ae753ec6c6b4d715e7186a3ba526dbb57da3df45f0fa67279ad70451cc

Contents?: true

Size: 1.14 KB

Versions: 27

Compression:

Stored size: 1.14 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("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::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

27 entries across 27 versions & 3 rubygems

Version Path
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/therubyracer-0.11.4/ext/v8/heap.cc
therubyracer-0.11.4 ext/v8/heap.cc
therubyracer-0.11.3 ext/v8/heap.cc
therubyracer-0.11.2 ext/v8/heap.cc
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/therubyracer-0.11.0/ext/v8/heap.cc
therubyracer-0.11.1 ext/v8/heap.cc
therubyracer-0.11.1beta1 ext/v8/heap.cc
therubyracer-0.11.0 ext/v8/heap.cc
therubyracer-0.11.0beta8-x86-freebsd-9 ext/v8/heap.cc
therubyracer-0.11.0beta8-x86_64-linux ext/v8/heap.cc
therubyracer-0.11.0beta8-x86-linux ext/v8/heap.cc
therubyracer-0.11.0beta8 ext/v8/heap.cc
therubyracer-0.11.0beta7-x86_64-linux ext/v8/heap.cc
therubyracer-0.11.0beta7-x86-linux ext/v8/heap.cc
therubyracer-0.11.0beta7-x86_64-darwin-10 ext/v8/heap.cc
therubyracer-0.11.0beta7 ext/v8/heap.cc
therubyracer-0.11.0beta6-x86-linux ext/v8/heap.cc
therubyracer-0.11.0beta6-x86_64-linux ext/v8/heap.cc
therubyracer-0.11.0beta6 ext/v8/heap.cc
therubyracer-0.11.0beta5-x86-linux ext/v8/heap.cc