Yukihiro "Matz" Matsumoto
ed1bf9aa80
introduce mrb_str_new_lit() to create strings from C string litrals
2014-02-06 07:50:34 +09:00
cremno
a2cfc9a9af
rework mruby-objectspace and gc.[ch]
...
- functions should have C linkage (for C++ code)
- add prefix to each_object_callback
- use more appropriate variable types / initialization
- ObjectSpace::count_objects has 1 opt. arg.
- prefer mrb_intern_lit to mrb_intern_cstr for str. lit.
- mruby/value.h is included by mruby.h
- adjust coding style
2014-01-31 17:42:05 +01:00
cremno
aa655b9ee1
remove superfluous includes
...
- reduce compile time by a little bit (full-core: ~0.7s for me)
- thanks to 'include-what-you-use' for some help
- include Standard C header files before any other (coding style)
2014-01-07 17:56:30 +01:00
Yukihiro "Matz" Matsumoto
a26a6fecee
Merge pull request #1637 from h2so5/extended-arena-size
...
Fix extended arena check in gc_protect
2014-01-02 15:44:31 -08:00
h2so5
a44cc14e1c
Fix extended arena check in gc_protect
2014-01-02 18:23:26 +09:00
cremno
18433731ed
remove various preprocessor conditionals
...
- HAVE_IEEEFP_H is nowhere defined or needed at all
- FreeBSD < 4 is unsupported since years
- MSVC workaround (around what exactly?)
2014-01-02 07:33:33 +01:00
Yukihiro "Matz" Matsumoto
07b8a5b042
Make mrb->arena variable sized. Use MRB_GC_FIXED_ARENA for old behavior.
...
You will not see "arena overflow" error anymore, but I encourage gem authors
to check your gems with MRB_GC_FIXED_ARENA to avoid memory broat.
2013-11-22 09:20:06 +09:00
Yukihiro "Matz" Matsumoto
de790bdc27
allow irep to be GCed
2013-11-08 20:39:50 +09:00
Yukihiro "Matz" Matsumoto
677a2ac226
irep->pool not to be GCed
2013-11-07 04:20:46 +09:00
Yukihiro "Matz" Matsumoto
e92d4e2680
modified to use irep->reps to reference child ireps. preparation for
...
removing irep array from mrb_state. note that instructions OP_LAMBDA,
OP_EXEC and OP_EPUSH are incompatible, and dumped mrb format has changed.
2013-11-07 03:54:22 +09:00
Yukihiro "Matz" Matsumoto
e386760cc7
add Fiber.current
2013-11-04 23:58:32 +09:00
Daniel Bovensiepen
302e20333b
Improve Grammar of Documentation
2013-10-02 00:50:55 +08:00
Yukihiro "Matz" Matsumoto
f8454e53ba
check d->type before accessing d->type->dfree; #1474 #858
2013-08-14 16:51:50 +09:00
fleuria
b3b4f2dbdb
clean up the warnings when GC_PROFILE is on
2013-08-09 17:38:09 +08:00
Yukihiro "Matz" Matsumoto
3d3ca985b0
remove duplicated incremental_gc_until() in generational GC; #1449
2013-08-09 18:11:16 +09:00
fleuria
7e7943322b
add comments for major GC
2013-08-09 15:43:06 +08:00
Yukihiro "Matz" Matsumoto
30f86069de
finish half-baked GC cycle before starting full GC; #1447
2013-08-08 22:08:12 +09:00
Yukihiro "Matz" Matsumoto
1e87bf6d2f
allow turning off GC generational mode by default by MRB_GC_TURN_OFF_GENERATIONAL; #1447
2013-08-08 21:42:20 +09:00
fleuria
22ac62a4f1
fix #1442
...
in the marking root phase, we only marked the root context, but leaving
the current context unmarked. when we execute a fiber, the current
context would be changed and trigger this issue.
2013-08-07 19:42:56 +08:00
fleuria
107906e3cb
revise the comment in mrb_full_gc()
...
the old comment "clean all the black object as old" looks confusing,
it looks like "transform black object to old object", but indeed black
is old,
2013-08-01 17:50:13 +08:00
fleuria
c1469a57a2
add comment for clear_all_old()
2013-08-01 17:30:57 +08:00
fleuria
bbbe996e0d
replace gc_assert with mrb_assert
2013-07-25 02:55:51 +08:00
Yukihiro "Matz" Matsumoto
8a298605e6
remove an unused local variable
2013-07-24 23:58:10 +09:00
Yukihiro "Matz" Matsumoto
5146219cbd
revise gc_mark_gray_list() not to cause SEGV on Ubuntu 32bit
2013-07-24 23:47:52 +09:00
Yukihiro "Matz" Matsumoto
4ad4ce6caf
restore once removed mrb_garbage_collect()
2013-07-24 23:31:46 +09:00
Yukihiro "Matz" Matsumoto
e1706e65f9
Merge pull request #1407 from Fleurer/gc-introduce-incremental-gc-step
...
separate out `incremental_gc_step()` from `mrb_incremental_gc()`, and misc minor rename
2013-07-24 07:18:50 -07:00
fleuria
7bfdcace52
fix warning
2013-07-24 18:27:23 +08:00
fleuria
2591922ec2
rename variable_gray_list to atomic_gray_list
2013-07-24 18:22:53 +08:00
fleuria
88eb0f54e9
introduce gc_mark_gray_list(), and cleanup redaunt code with it
2013-07-24 18:22:53 +08:00
fleuria
0c0efc16b0
gc: replace comment "a round of GC" to "a GC cycle"
2013-07-24 16:22:38 +08:00
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