diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-11-01 08:53:44 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-11-01 08:53:44 +0000 |
commit | c39797e8724683e91618168bd993ac467b81eda8 (patch) | |
tree | 25bfba803716b7301a047bc579788bd8998cc29d /transient_heap.h | |
parent | dcd0346265bfd346133e75c701b97fcb31c0ae6d (diff) |
introduce USE_TRANSIENT_HEAP to enable/disable theap.
* include/ruby/ruby.h: intrdocue `USE_TRANSIENT_HEAP` macro
to enable/disable transient heap.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'transient_heap.h')
-rw-r--r-- | transient_heap.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/transient_heap.h b/transient_heap.h index 2ba0b638e5..a34aa1e4f8 100644 --- a/transient_heap.h +++ b/transient_heap.h @@ -9,6 +9,10 @@ #ifndef RUBY_TRANSIENT_HEAP_H #define RUBY_TRANSIENT_HEAP_H +#include "internal.h" + +#if USE_TRANSIENT_HEAP + /* public API */ /* Allocate req_size bytes from transient_heap. @@ -37,4 +41,20 @@ void rb_ary_transient_heap_evacuate(VALUE ary, int promote); void rb_obj_transient_heap_evacuate(VALUE obj, int promote); void rb_hash_transient_heap_evacuate(VALUE hash, int promote); void rb_struct_transient_heap_evacuate(VALUE st, int promote); + +#else /* USE_TRANSIENT_HEAP */ + +#define rb_transient_heap_alloc(o, s) NULL +#define rb_transient_heap_verify() ((void)0) +#define rb_transient_heap_promote(obj) ((void)0) +#define rb_transient_heap_start_marking(full_marking) ((void)0) +#define rb_transient_heap_finish_marking() ((void)0) +#define rb_transient_heap_mark(obj, ptr) ((void)0) + +#define rb_ary_transient_heap_evacuate(x, y) ((void)0) +#define rb_obj_transient_heap_evacuate(x, y) ((void)0) +#define rb_hash_transient_heap_evacuate(x, y) ((void)0) +#define rb_struct_transient_heap_evacuate(x, y) ((void)0) + +#endif /* USE_TRANSIENT_HEAP */ #endif |