Commit Graph

140 Commits

Author SHA1 Message Date
fleuria c852626ea7 rename mrb_garbage_collect() to mrb_full_gc() 2013-07-24 16:17:53 +08:00
fleuria 9cc43a970c introduce incremental_gc_step() 2013-07-24 16:17:53 +08:00
fleuria 9bce2eb8b3 gc: add comments for Generational Mode 2013-07-23 17:04:54 +08:00
fleuria 6a1cb4465b revise the Two White Parts comments in gc.c 2013-07-22 16:26:59 +08:00
Yukihiro "Matz" Matsumoto 84991d6388 Merge pull request #1392 from Fleurer/gc-rename-advance-phase
rename advance_phace() to incremental_gc_until(), and cleanup some redundant codes with it.
2013-07-21 17:58:57 -07:00
Yukihiro "Matz" Matsumoto 2daf39ddc8 change else formatting 2013-07-22 09:52:06 +09:00
fleuria c49e2d766e cleanup redundant codes with incremental_gc_until() 2013-07-19 12:16:27 +08:00
fleuria d4f375b48b rename advance_phase to incremental_gc_until
in fact advance_phace() is not really a "phase", but can be used
as an utility function.
2013-07-19 12:01:34 +08:00
Jun Hiroe 16031af1e7 Replace 0 with NULL because set NULL in sturct pointer. 2013-07-14 05:27:39 +09:00
Yukihiro "Matz" Matsumoto ea4080e9f2 mark stacks in final_marking; close #1359; close #1362 2013-07-12 00:23:37 +09:00
Yukihiro "Matz" Matsumoto 8b29f10ba9 factor out context stack marking 2013-07-12 00:15:50 +09:00
Yukihiro "Matz" Matsumoto b119330158 Merge pull request #1330 from suzukaze/refactor-gc-c
Refactor mrb_realloc() func in gc.c.
2013-07-02 04:11:04 -07:00
Jun Hiroe 3c197f6ab1 Refactor mrb_realloc() func in gc.c. 2013-07-01 22:00:08 +09:00
Carson McDonald d8c4ce8f49 Fix unsigned/signed warning. 2013-07-01 07:03:21 -04:00
fleuria 68f31e94f5 refactor mrb_realloc()
remove the redundant codes with mrb_malloc_simple()
2013-06-28 23:15:31 +08:00
Yukihiro "Matz" Matsumoto 3ceeb0be95 add mrb_malloc_simple() that returns NULL on error 2013-06-25 15:38:28 +09:00
kyab cb05763928 Fix compile warning for abort 2013-06-20 18:00:10 +09:00
Masaki Muranaka 97b9caf892 Check parameters strictly.
calloc in C99 is expected to return NULL when nelem * len == 0.
2013-06-11 16:09:12 +09:00
kimu_shu e720782f81 Add MRB_WORD_BOXING mode (represent mrb_value as a word) 2013-05-26 10:09:17 +09:00
Yukihiro "Matz" Matsumoto d78f23d28b fix fiber GC problem 2013-05-26 00:37:44 +09:00
Yukihiro "Matz" Matsumoto 2045a35292 garbage collect context (fiber) properly 2013-05-22 11:05:22 +09:00
Yukihiro "Matz" Matsumoto 5c0b9b703c primary mruby fiber implementation 2013-05-20 17:54:07 +09:00
Ryan Scott 4acfadfee1 Fixed the each object callback to be more consistent with other callbacks. 2013-05-18 10:55:41 +10:00
Ryan Scott 40d63f7740 Changed the each_object callback so that a pointer is passed for the object, instead of the struct. 2013-05-17 08:02:24 +10:00
Ryan Scott f62cc5b1ee Changed the object_count so that it only iterates over the RBasic object, not the full RVALUE known by the GC 2013-05-17 07:41:13 +10:00
Ryan Scott 222918deae First implementation of ObjectSpace moved outside of gc.c 2013-05-17 07:21:33 +10:00
Ryan Scott a71bf5e3df Change in formatting for os_count_objects to be consistent with other functions. 2013-05-12 19:51:51 +10:00
Ryan Scott 279fce05ae ObjectSpace.count_objects was incorrectly checking if an object was already freed. Amended the count_objects test to ensure the correct distinction 2013-05-12 19:49:56 +10:00
Ryan Scott 0d4227ac04 Implemented ObjectSpace.count_objects to count the number of allocated objects for each type 2013-05-12 18:42:21 +10:00
Yukihiro "Matz" Matsumoto b6fc3f831d change return value of mrb_free from void* to void 2013-04-29 09:12:44 +09:00
Yukihiro "Matz" Matsumoto 443b2c2a2b rename hash related gc functions 2013-04-29 07:48:33 +09:00
Yukihiro "Matz" Matsumoto a1df3fdb0c fix mrb_string_shared memory leaks 2013-04-29 07:47:12 +09:00
Yukihiro "Matz" Matsumoto 5c68195c88 mrb_str_new_static(): zero copy string creation 2013-04-28 02:47:22 +09:00
Yukihiro "Matz" Matsumoto 30d580ecbc rename every ARGS_XXX to MRB_ARGS_XXX; ref #1206 2013-04-25 09:47:36 +09:00
h2so5 9b798114bb Use mrb_bool for the 'b' format specifier of mrb_get_args 2013-04-22 10:41:53 +09:00
Masaki Muranaka c7ff1bd881 Add the care for malloc failed.
At the first time, mrb_realloc raise RuntimeError.
At the time fails twice in a row, it causes panic.
2013-04-01 08:40:05 +09:00
Masaki Muranaka 74f04849c4 Rearrange SIZE_MAX. It is supported also VC++ since its version10. And there seems SIZE_MAX is defined in stdint.h. And it possibly (depends on the version of VC++) conflicts with SIZE_MAX in limits.h. This patch is no need if I did not support VC++. 2013-03-29 11:02:35 +09:00
Masaki Muranaka 2b5b161f8b Sort include files. Some redundant includes are removed. 2013-03-29 10:22:31 +09:00
Yukihiro Matz Matsumoto b1bd62e047 remove all MRB_TT_MAIN from source 2013-03-26 21:25:00 +09:00
Carson McDonald 930e4c71c0 Make mrb_top_self return a real instance. 2013-03-25 00:23:22 -04:00
Yukihiro Matz Matsumoto f0ac204f21 Use size_t instead of int. This is for portability. 2013-03-24 00:20:35 +09:00
Yukihiro Matz Matsumoto d0d920e909 rename mrb_true_or_false_value() to mrb_bool_value() 2013-03-19 12:03:54 +09:00
Masaki Muranaka e827f774c6 Use mrb_true_or_false_value() / in gc_generational_mode_set(). 2013-03-19 11:04:21 +09:00
Masaki Muranaka 58c0f9da1c Use mrb_true_or_false_value() / in change_gen_gc_mode(). 2013-03-19 11:04:20 +09:00
Masaki Muranaka 0ee0eb916b Use mrb_true_or_false_value() / in gc_disable(). 2013-03-19 11:04:20 +09:00
Masaki Muranaka c102526434 Use mrb_true_or_false_value() / in gc_enable(). 2013-03-19 11:04:20 +09:00
Yukihiro Matz Matsumoto 88483fad00 rename mrb_basic to mrb_basic_ptr; close #1011 2013-03-15 23:21:13 +09:00
Masaki Muranaka 1ffc9ba325 Define type mrb_bool. It is typedef-ed to _Bool on C99, unsigned int on MSVC.
It is safer than applying 1bit bit-fields to signed int.

For forward compatibility, you should substiture only 1 or 0 for the variable typed mrb_bool.
2013-03-14 15:13:12 +09:00
MATSUMOTO Ryosuke 809732ab40 Adjust some indents 2013-03-02 10:26:54 -08:00
mattn 261efd8e9d Merge branch 'master' into pluggable_struct 2013-03-01 14:42:42 +09:00