Class: Majo::AllocationInfo
- Inherits:
-
Object
- Object
- Majo::AllocationInfo
- Defined in:
- lib/majo/allocation_info.rb,
ext/majo/allocation_info.c
Instance Method Summary collapse
- #alloc_generation ⇒ Object
- #class_path ⇒ Object
- #eql?(other) ⇒ Boolean
- #free_generation ⇒ Object
- #hash ⇒ Object
- #inspect ⇒ Object
- #line ⇒ Object
- #memsize ⇒ Object
- #method_id ⇒ Object
- #object_class_path ⇒ Object
- #path ⇒ Object
- #singleton? ⇒ Boolean
Instance Method Details
#alloc_generation ⇒ Object
93 94 95 96 97 |
# File 'ext/majo/allocation_info.c', line 93
static VALUE
allocation_info_alloc_generation(VALUE self) {
majo_allocation_info *info = majo_check_allocation_info(self);
return SIZET2NUM(info->alloc_generation);
}
|
#class_path ⇒ Object
54 55 56 57 58 59 60 61 62 |
# File 'ext/majo/allocation_info.c', line 54
static VALUE
allocation_info_class_path(VALUE self) {
majo_allocation_info *info = majo_check_allocation_info(self);
if (info->class_path) {
return rb_str_new2(info->class_path);
} else {
return Qnil;
}
}
|
#eql?(other) ⇒ Boolean
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/majo/allocation_info.rb', line 11 def eql?(other) other.is_a?(AllocationInfo) && path == other.path && class_path == other.class_path && method_id == other.method_id && line == other.line && object_class_path == other.object_class_path && alloc_generation == other.alloc_generation && free_generation == other.free_generation && memsize == other.memsize end |
#free_generation ⇒ Object
99 100 101 102 103 104 105 106 |
# File 'ext/majo/allocation_info.c', line 99
static VALUE
allocation_info_free_generation(VALUE self) {
majo_allocation_info *info = majo_check_allocation_info(self);
if (info->free_generation == 0) {
return Qnil;
}
return SIZET2NUM(info->free_generation);
}
|
#hash ⇒ Object
7 8 9 |
# File 'lib/majo/allocation_info.rb', line 7 def hash path.hash ^ class_path.hash ^ method_id.hash ^ line.hash ^ object_class_path.hash ^ alloc_generation.hash ^ free_generation.hash ^ memsize.hash end |
#inspect ⇒ Object
3 4 5 |
# File 'lib/majo/allocation_info.rb', line 3 def inspect "#<Majo::AllocationInfo #{object_class_path} #{class_path}##{method_id} #{path}:#{line} gen#{alloc_generation}..#{free_generation}>" end |
#line ⇒ Object
74 75 76 77 78 |
# File 'ext/majo/allocation_info.c', line 74
static VALUE
allocation_info_line(VALUE self) {
majo_allocation_info *info = majo_check_allocation_info(self);
return LONG2NUM(info->line);
}
|
#memsize ⇒ Object
108 109 110 111 112 |
# File 'ext/majo/allocation_info.c', line 108
static VALUE
allocation_info_memsize(VALUE self) {
majo_allocation_info *info = majo_check_allocation_info(self);
return SIZET2NUM(info->memsize);
}
|
#method_id ⇒ Object
81 82 83 84 85 |
# File 'ext/majo/allocation_info.c', line 81
static VALUE
allocation_info_method_id(VALUE self) {
majo_allocation_info *info = majo_check_allocation_info(self);
return info->mid;
}
|
#object_class_path ⇒ Object
64 65 66 67 68 69 70 71 72 |
# File 'ext/majo/allocation_info.c', line 64
static VALUE
allocation_info_object_class_path(VALUE self) {
majo_allocation_info *info = majo_check_allocation_info(self);
if (info->object_class_path) {
return rb_str_new2(info->object_class_path);
} else {
return Qnil;
}
}
|
#path ⇒ Object
44 45 46 47 48 49 50 51 52 |
# File 'ext/majo/allocation_info.c', line 44
static VALUE
allocation_info_path(VALUE self) {
majo_allocation_info *info = majo_check_allocation_info(self);
if (info->path) {
return rb_str_new2(info->path);
} else {
return Qnil;
}
}
|
#singleton? ⇒ Boolean
87 88 89 90 91 |
# File 'ext/majo/allocation_info.c', line 87
static VALUE
allocation_info_singleton_p(VALUE self) {
majo_allocation_info *info = majo_check_allocation_info(self);
return info->singleton_p ? Qtrue : Qfalse;
}
|