diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-17 07:57:03 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-17 07:57:03 +0000 |
commit | 8ac4f421e13adc2216b4056ab241136066548e7e (patch) | |
tree | acac90645bbfd808e922a6a8a8cbdfe3e3df89ae /internal.h | |
parent | 380e40af9640cc79bfd1a5b97a3ad068f06d499f (diff) | |
download | ruby-8ac4f421e13adc2216b4056ab241136066548e7e.tar.gz |
* gc.c, internal.h: add new internal memory mangement functions.
* void *ruby_xsizedrealloc(void *ptr, size_t new_size, size_t old_size)
* void ruby_xsizedfree(void *x, size_t size)
These functions acccept additional size parameter to calculate more
accurate malloc_increase parameter which control GC timing.
[Feature #8985]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'internal.h')
-rw-r--r-- | internal.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/internal.h b/internal.h index c1890961c3..b8c0df6e17 100644 --- a/internal.h +++ b/internal.h @@ -432,6 +432,9 @@ void *ruby_mimmalloc(size_t size); void rb_objspace_set_event_hook(const rb_event_flag_t event); void rb_gc_writebarrier_remember_promoted(VALUE obj); +void *ruby_xsizedrealloc(void *ptr, size_t new_size, size_t old_size) RUBY_ATTR_ALLOC_SIZE((2));; +void ruby_xsizedfree(void *x, size_t size); + /* hash.c */ struct st_table *rb_hash_tbl_raw(VALUE hash); #define RHASH_TBL_RAW(h) rb_hash_tbl_raw(h) |