Implemented ObjectSpace.count_objects to count the number of allocated objects for each type

This commit is contained in:
Ryan Scott
2013-05-12 18:42:21 +10:00
parent 37e3643f8f
commit 0d4227ac04
5 changed files with 146 additions and 2 deletions
+2
View File
@@ -29,6 +29,8 @@ mrb_value mrb_hash_fetch(mrb_state *mrb, mrb_value hash, mrb_value key, mrb_valu
mrb_value mrb_hash_delete_key(mrb_state *mrb, mrb_value hash, mrb_value key);
mrb_value mrb_hash_keys(mrb_state *mrb, mrb_value hash);
mrb_value mrb_check_hash_type(mrb_state *mrb, mrb_value hash);
mrb_value mrb_hash_empty_p(mrb_state *mrb, mrb_value self);
mrb_value mrb_hash_clear(mrb_state *mrb, mrb_value hash);
/* RHASH_TBL allocates st_table if not available. */
#define RHASH(obj) ((struct RHash*)((obj).value.p))