remove memleaks using linked allocator

This commit is contained in:
Yukihiro Matsumoto
2012-09-03 08:34:31 +09:00
parent 5340126443
commit 4f7a1a167d
5 changed files with 39 additions and 17 deletions
+3 -2
View File
@@ -106,8 +106,8 @@ typedef struct mrb_state {
struct RClass *false_class;
struct RClass *nil_class;
struct RClass *symbol_class;
struct RClass *kernel_module;
struct heap_page *heaps;
struct heap_page *sweeps;
struct heap_page *free_heaps;
@@ -124,10 +124,10 @@ typedef struct mrb_state {
int gc_interval_ratio;
int gc_step_ratio;
int gc_disabled;
struct alloca_header *mems;
mrb_sym symidx;
struct kh_n2s *name2sym; /* symbol table */
struct kh_s2n *sym2name; /* reverse symbol table */
#ifdef INCLUDE_REGEXP
struct RNode *local_svar;/* regexp */
#endif
@@ -362,6 +362,7 @@ void mrb_pool_close(struct mrb_pool*);
void* mrb_pool_alloc(struct mrb_pool*, size_t);
void* mrb_pool_realloc(struct mrb_pool*, void*, size_t oldlen, size_t newlen);
int mrb_pool_can_realloc(struct mrb_pool*, void*, size_t);
void* mrb_alloca(mrb_state *mrb, size_t);
#if defined(__cplusplus)
} /* extern "C" { */