summaryrefslogtreecommitdiff
path: root/gc.c
AgeCommit message (Collapse)Author
2008-05-20* include/ruby/ruby.h (PRI[diouxX]VALUE): printf format for VALUE.nobu
* gc.c (assign_heap_slot): suppress a warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-19* vm.c, insns.def, eval.c, vm_insnhelper.c: fix CREF handling.ko1
VM value stack frame of block contains cref information. (dfp[-1] points CREF) * compile.c, eval_intern.h, eval_method.c, load.c, proc.c, vm_dump.h, vm_core.h: ditto. * include/ruby/ruby.h, gc.c: remove T_VALUES because of above changes. * bootstraptest/test_eval.rb, test_knownbug.rb: move solved test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-12* gc.c (ruby_vm_xmalloc): increase malloc_increase only if mallocakr
succeeds. failed malloc size can be huge. it may increase malloc_limit too big which cause less GC and memory full. (ruby_vm_xrealloc): ditto. (rb_objspace): make params.limit and params.increase size_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-12* gc.c (assign_heap_slot): fix condition for number of objects inakr
a heap. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-12 * gc.c (assign_heap_slot): put the binary-search routine in order.yugui
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-11* include/ruby/ruby.h (SIZET2NUM): new macro.akr
(NUM2SIZET): new macro. * gc.c (struct rb_objspace): use size_t for increment, length and used for 64bit. (allocate_heaps): ditto. (assign_heap_slot): ditto. (set_heaps_increment): ditto. (gc_mark_all): ditto. (is_pointer_to_heap): ditto. (free_unused_heaps): ditto. (gc_sweep): ditto. (os_obj_of): ditto. (rb_gc_call_finalizer_at_exit): ditto. (count_objects): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-10 * gc.c (gc_count): rdoc corrected.yugui
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-04* gc.c (set_heaps_increment): fix memory allocation strategy byakr
determining heaps_inc from heaps_used, not objects_delta. (struct rb_objspace): delta removed. change increment, length and used to long for LP64. (objects_delta): removed. (allocate_heaps): add next_heaps_length argument. (init_heap): renamed from add_heap. (garbage_collect): use heaps_increment in dont_gc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-27* gc.c (gc_count): add a GC.count method. This method returnsko1
a GC invoking count. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-27* vm_core.h (rb_vm_t), gc.c (rb_objspace, rb_newobj), vm.cnobu
(Init_BareVM): per-VM object space support, which is disabled now. * gc.c (rb_objspace_alloc), vm.c (Init_BareVM): should not use ruby malloc here. * gc.c (garbage_collect, etc): performance improvement by passing the reference instead of refering the global variable in each functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-26* error.c (builtin_types), gc.c (count_objects): added Complex andnobu
Rational. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-26* include/ruby/ruby.h, gc.c: remove T_BLOCK.ko1
* include/ruby/ruby.h: re-number T_xxx. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-25* gc.c (free_unused_heaps): preserve last used heap segment tomatz
reduce malloc() call. * gc.c (HEAP_SIZE): use smaller heap segment (2K) for more chance to be freed. based on patch from authorNari <authornari at gmail.com>. * gc.c (rb_newobj_from_heap): eventually allocate heap segments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-20 * gc.c (ruby_xmalloc): use size_t for malloc argument instead of long.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-18* gc.c (rb_gc_mark_locations): get rid of underflow.nobu
* gc.c (mark_current_machine_context): check if the main thread stack position may shink under the intialized position. [ruby-core:16436] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-14* gc.c (Init_stack): use ruby_init_stack. [ruby-dev:34350]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-14* gc.c (rb_objspace_t): packed globals. [ruby-dev:34348]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-14* gc.c (finalizers): removed. [ruby-dev:34349]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-12* eval.c (ruby_exec_node, ruby_run_node), ruby.c (process_options):nobu
use iseq instead of NODE. * gc.c (source_filenames): removed. * include/ruby/intern.h, parse.y (yycompile, parser_mark, parser_free, ripper_initialize): rb_source_filename() is no longer used. * compile.c, compile.h (ERROR_ARGS), parse.y (node_newnode, fixpos, parser_warn, e_option_supplied, warn_unless_e_option, range_op, cond0): nd_file is no longer used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-31* configure.in (RUBY_SETJMP, RUBY_LONGJMP, RUBY_JMP_BUF): prefersnobu
__builtin_setjmp, _setjmp over setjmp and sigsetjmp. [ruby-core:16023], [ruby-core:16086] * configure.in (--with-setjmp-type): new option to override the default rule in the above. * eval_intern.h (ruby_setjmp, ruby_longjmp), gc.c (rb_setjmp), vm_core.h (rb_jmpbuf_t): use RUBY_SETJMP, RUBY_LONGJMP and RUBY_JMP_BUF. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-16both complex and rational are now builtin classes.tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-12* eval_intern.h (rb_thread_raised_set): use generic flags.nobu
* eval.c (rb_longjmp): clear all raised flags. * eval.c (stack_check): leave clearing flag to rb_longjmp. * gc.c (rb_memerror): use thread raised flag instead of static flag. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-12* gc.c: fixed indent.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-12* gc.c: removed trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-05* numeric.c (fix_to_s): avoid rb_scan_args() when no argumentmatz
given. * bignum.c (rb_big_to_s): ditto. * enum.c (enum_first): ditto. * eval_jump.c (rb_f_catch): ditto. * io.c (rb_obj_display): ditto. * class.c (rb_obj_singleton_methods): ditto. * object.c (rb_class_initialize): ditto. * random.c (rb_f_srand): ditto. * range.c (range_step): ditto. * re.c (rb_reg_s_last_match): ditto. * string.c (rb_str_to_i): ditto. * string.c (rb_str_each_line): ditto. * string.c (rb_str_chomp_bang): ditto. * string.c (rb_str_sum): ditto. * string.c (str_modifiable): declare inline. * string.c (str_independent): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-04* gc.c (add_heap): fix previous change. [ruby-dev:33988]akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-04* gc.c (add_heap): use binary search to find the place to insert thenobu
new heap slot. [ruby-dev:33983] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-03* gc.c (add_heap): sort heaps array in ascending order to usematz
binary search. * gc.c (is_pointer_to_heap): use binary search to identify object in heaps. works better when number of heap segments grow big. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-25* include/ruby/ruby.h (ROBJECT_NUMIV): renamed from ROBJECT_LEN.akr
(ROBJECT_IVPTR): renamed from ROBJECT_PTR. * variable.c: follow the above renaming. * object.c: ditto. * gc.c: ditto. * marshal.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-19* gc.c (STACK_LENGTH) [SPARC] : 0x80 offset removed. [ruby-dev:33857]akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-16* include/ruby/re.h (struct rmatch_offset): new struct for characterakr
offsets. (struct rmatch): new struct. (struct RMatch): reference struct rmatch. (RMATCH_REGS): new macro. * re.c (match_alloc): initialize struct rmatch. (pair_byte_cmp): new function. (update_char_offset): update character offsets. (match_init_copy): copy regexp and character offsets. (match_sublen): removed. (match_offset): use update_char_offset. (match_begin): ditto. (match_end): ditto. (rb_reg_search): make character offset updated flag false. (match_size): use RMATCH_REGS. (match_backref_number): ditto. (rb_reg_nth_defined): ditto. (rb_reg_nth_match): ditto. (rb_reg_match_pre): ditto. (rb_reg_match_post): ditto. (rb_reg_match_last): ditto. (match_array): ditto. (match_aref): ditto. (match_values_at): ditto. (match_inspect): ditto. * string.c (rb_str_subpat_set): use RMATCH_REGS. (rb_str_sub_bang): ditto. (str_gsub): ditto. (rb_str_split_m): ditto. (scan_once): ditto. * gc.c (obj_free): free character offsets. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-21* eval.c, gc.c (setjmp): sigsetjmp is a macro on cygwin.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-19* configure.in (sigsetjmp): check if available.nobu
* eval.c, gc.c (setjmp): do not use _setjmp if sigsetjmp is available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-06* $Date$ keyword removed to avoid inclusion of locale dependentakr
string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-28* gc.c (os_obj_of): returns an enumerator if no block given. based onnobu
a patch from Yugui <yugui AT yugui.sakura.ne.jp>. [ruby-dev:32828] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-21* gc.c (rb_garbage_collect): new function for debugging.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-15* vm_core.h (rb_thread_t): new member machine_stack_maxsize andakr
machine_register_stack_maxsize. * gc.c (rb_gc_stack_maxsize): new global variable for the thread size of the main thread. (STACK_LEVEL_MAX): use machine_stack_maxsize of current thread. (ruby_stack_check): check IA64 register stack. (ruby_set_stack_size): set rb_gc_stack_maxsize. (Init_stack): set rb_gc_stack_maxsize. * thread_pthread.ci (native_thread_create): initialize th->machine_stack_maxsize and th->machine_register_stack_maxsize. * vm.c (Init_BareVM): initialize th->machine_stack_maxsize and th->machine_register_stack_maxsize. * thread_win32.ci (native_thread_create): initialize th->machine_stack_maxsize. not tested. just a guess at all. [ruby-dev:32604] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-09* parse.y (expr): redefinable not (!) operator.matz
* parse.y (arg): ditto. * object.c (rb_obj_not): new method "!". * object.c (rb_obj_not_equal): new method "!=". * object.c (rb_obj_not_match): new method "!~". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-20* gc.c (gc_mark_children): obj->as.file.fptr may be 0 for T_FILE.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-20* include/ruby/io.h (rb_io_t): add tied_io_for_writing member.akr
* io.c: use tied_io_for_writing for duplex popen. * gc.c: mark tied_io_for_writing. * common.mk: gc.o depends io.h. [ruby-dev:32205] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-03* gc.c (count_objects): count TOTAL.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-03* gc.c (count_objects): ObjectSpace.count_objects implemented.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-13* encoding.c (rb_cEncoding): new Encoding class.nobu
* encoding.c (rb_to_encoding, rb_to_encoding_index): helper functions. * encoding.c (rb_obj_encoding): return Encoding object now. * gc.c (garbage_collect): mark Encoding objects. * string.c (rb_str_force_encoding): accept Encoding object as well as encoding name. * include/ruby/encoding.h (rb_to_encoding_index, rb_to_encoding): prototypes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-01* gc.c (id2ref): skip ICLASS.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-01* gc.c (id2ref): T_VALUES is less than T_BLOCK. [ruby-dev:31911]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-28* include/ruby/intern.h: export rb_ivar_foreach.akr
* include/ruby/ruby.h: modify struct RObject and RClass for optimizing T_OBJECT space. [ruby-dev:31853] (ROBJECT_LEN, ROBJECT_PTR) (RCLASS_IV_TBL, RCLASS_M_TBL, RCLASS_SUPER, RCLASS_IV_INDEX_TBL) (RMODULE_IV_TBL, RMODULE_M_TBL, RMODULE_SUPER): abstract accessor defined. * variable.c: support the modified RObject and RClass. * object.c: ditto. * class.c: ditto. * gc.c: ditto. * marshal.c: ditto. * eval_method.ci: use the abstract accessor. * insns.def: ditto. * proc.c: ditto. * struct.c: ditto. * eval.c: ditto. * error.c: ditto. * vm.c: ditto. * insnhelper.ci: ditto. * ext/digest/digest.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-26* gc.c (rb_mark_set): new function to mark keys.nobu
* marshal.c (struct dump_arg, struct load_arg): added wrappers to mark data and compat_tbl entries. [ruby-dev:31870] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-23* gc.c (os_obj_of, os_each_obj): hide objects to be finalized.nobu
[ruby-dev:31810] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-21* gc.c (gc_mark_rest): copy just used part.nobu
* gc.c (gc_mark_children): mark u1 and u2 of NODE_ARGSCAT. * gc.c (os_obj_of): hide T_VALUES too. [ruby-dev:31804] * gc.c (run_final): freeze temporary argument array. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-01* include/ruby/ruby.h (struct RBignum): embed digits in RBignum forakr
small bignums. * bignum.c: RBignum embeded digits implemented. * include/ruby/intern.h: declare rb_big_resize. * gc.c: don't free embedded digits. * numeric.c: replace direct bignum field accessor by abstract field accessor such as RBIGNUM(val)->sign to RBIGNUM_SIGN(val). * sprintf.c: ditto. * compar.c: ditto. * marshal.c: ditto. * random.c: ditto. * .gdbinit: support embedded small bignums. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e