summaryrefslogtreecommitdiff
path: root/gc.c
AgeCommit message (Collapse)Author
2009-09-21* compile.c, cont.c, gc.c, insns.def, iseq.c, iseq.h, process.c,nobu
thread.c, vm.c, vm_core.h, vm_dump.c, vm_eval.c, vm_insnhelper.c, vm_method.c, template/insns_info.inc.tmpl, tool/instruction.rb: fixed types. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-18* common.mk (eval.o): needs vm.h.nobu
* eval.c (ruby_cleanup): destruct current VM before exit. * gc.c (rb_objspace_free): free object space. * vm.c (ruby_vm_destruct): destruct and free VM struct. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-17* gc.c (vm_xrealloc): free as like standard free if size is zero.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-02* gc.c (obj_free): fix to free method table (fix memory leak).ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-28* method.h (rb_method_definition_t): split from rb_method_entry_tnobu
to deal aliases. [ruby-dev:39165] * proc.c (struct METHOD): contains rb_method_entry_t copy. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-26* method.c (rb_method_entry_t): body.proc should be marked.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-10* gc.c: reject unused longlife gc.nari
* debug.c: ditto. * include/ruby/intern.h: ditto. * include/ruby/ruby.h: ditto. * iseq.c: ditto. * node.h: ditto. * vm_insnhelper.c: ditto. * vm_insnhelper.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-21* gc.c (rb_gc_enable, rb_gc_disable): should return Qtrue/Qfalse.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-18* suppressed shorten-64-to-32 warnings.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-15* method.h, vm_core.h: add rb_method_entry_t. Remove nodes aroundko1
method management. This change affect some VM control stack structure. * vm.c, vm_insnhelper.c, vm_method.c, vm_eval.c: ditto. and make some refactoring. * insns.def, class.c, eval.c, proc.c, vm_dump.c : ditto. * vm_core.h, compile.c (iseq_specialized_instruction): remove VM_CALL_SEND_BIT. use another optimization tech for Kernel#send. * node.h: remove unused node types. * ext/objspace/objspace.c (count_nodes): ditto. * gc.c: add mark/free functions for method entry. * include/ruby/intern.h: remove decl of rb_define_notimplement_method_id(). nobody can use it because noex is not opend. * iseq.c (iseq_mark): fix to check ic_method is available. * iseq.c (rb_iseq_disasm): fix to use rb_method_get_iseq(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-07* include/ruby/ruby.h:ko1
rename "...TypeStruct" and "typed_struct" to "TypedData..." and "typeddata", respectively. rename rb_data_type_t#name to rb_data_type_t#wrap_struct_name. * error.c, gc.c, iseq.c, vm.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-07* gc.c (rb_gc_call_finalizer_at_exit): deal with typed struct likenobu
as obj_free(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-07* gc.c (GC_PROF_SET_MALLOC_INFO, GC_PROF_SET_HEAP_INFO): simplified.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-23* gc.c: remove the definition of GC_DEBUG (debugging macro).mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-16fix indent.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-16* include/ruby/ruby.h: New structure RTypedData, added.ko1
This structure incldues more explicit type information for T_DATA objects. If RData(obj)->dfree is immediate value `1' on T_DATA object obj, obj is needed to be accessed with RTYPEDDATA(obj) instead of RDATA(obj). A RTypedData structure points the structure rb_typed_data_t. rb_typed_data_t includes information such as the type name of this data, mark and free function what RData includes, and memsize function show how data consuming the memory size. Note that you do not need any change existing T_DATA objects. If you use RDataType instead of RData on T_DATA object, you can specify explicit type information. * gc.c (rb_data_typed_object_alloc, rb_objspace_data_type_memsize, rb_objspace_data_type_name): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-16* gc.c: fix indent.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-16* gc.c (rb_objspace_each_objects): New C API, added.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-15* gc.c (os_obj_of): invoke garbage collection before iteration, tomatz
avoid accessing half recycled object references. [ruby-dev:38613] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-26* gc.c: fixed types.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-13* gc.c: add longlife garbage collection. [ruby-dev:38423]nari
(NORMAL_HEAPS_USED): new macro. (LONGLIFE_ALLOCATE_HEAPS_MIN): ditto. (add_longlife_heaps_slot): new function. (rb_newobj_from_longlife_heap): ditto. (rb_newobj_longlife): ditto. (rb_node_newnode_longlife): ditto. (rb_gc_write_barrier): ditto. (remembered_set_recycle): ditto. (rb_gc_mark_remembered_set): ditto. (clear_mark_longlife_heaps): ditto. (gc_sweep_for_longlife): ditto. (assign_heap_slot): new argumnent to longlife heaps slot. (add_freelist): ditto. (gc_sweep): avoid lonlife heap slot. set longlife_collection flag at add heap. (rb_gc_force_recycle): avoid mark object and remembered_set object. (garbage_collect): add longlife collection. (rb_gc_start): invoke longlife collection. (gc_profile_record_get): for longlife collction profile. (gc_profile_result): ditto. * include/ruby/intern.h (rb_gc_write_barrier): declared. * include/ruby/ruby.h (FL_REMEMBERED_SET): renamed from FL_RESERVED. * debug.c (FL_REMEMBERED_SET): ditto. * insns.def (setinlinecache): insert write barrier. * vm_insnhelper.c (vm_method_search): ditto. * set_relation (set_relation): use longlife object. * vm.c (vm_define_method): ditto. * vm_core.h (NEW_INLINE_CACHE_ENTRY): ditto. * vm_method.c (rb_add_method): ditto. * class.c (rb_add_method): ditto. * node.h (NEW_NODE_LONGLIFE): new macro. (rb_node_newnode_longlife): declared. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-19* eval.c (ruby_cleanup): the order of local variables on stack isnobu
undefined. should use outermost VALUE for ruby_init_stack. * gc.c (ruby_get_stack_grow_direction, Init_stack): allows volatile pointer. * thread_*.c (ruby_init_stack): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-23* gc.c (init_heap): set default to heap slots lengthnari
if HEAP_OBJ_LIMIT is larger than HEAP_MIN_SLOTS. [Bug #1310] (set_heaps_increment): increment next_heaps_length if next_heaps_length and heaps_used are same. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-13* configure.in (AC_HEADER_DIRENT): added.nobu
* include/ruby/ruby.h (NUM2INT, rb_special_const_p): returns true and false instead of Qtrue and Qfalse for platforms where VALUE is bigger than int. * gc.c (gc_stress_set), ext/openssl/ossl_asn1.c (decode_bool): got rid of variables named `bool'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-12* array.c, bignum.c, dln.c, error.c, gc.c, io.c, marshal.c,nobu
numeric.c, pack.c, strftime.c, string.c, thread.c, transcode.c, transcode_data.h, util.c, variable.c, vm_dump.c, include/ruby/encoding.h, missing/crypt.c, missing/vsnprintf.c: suppress VC type warnings. [ruby-core:22726] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-10* array.c, bignum.c, gc.c, numeric.c, string.c, util.c, insns.def,nobu
missing/crypt.c, missing/vsnprintf.c, : suppress warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-27* gc.c (ruby_get_stack_grow_direction): no needs to use threadnobu
here, and not initialized yet. [ruby-core:22439] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22stripped trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-14* string.c (rb_hash_uint32, rb_hash_uint, rb_hash_start, rb_hash_end),mame
include/ruby/intern.h: add Murmurhash API. [ruby-dev:37784] * complex.c (nucomp_hash), array.c (rb_ary_hash), time.c (time_hash), string.c (rb_str_hsah), object.c (rb_obj_hash), range.c (range_hash), struct.c (rb_struct_hash), hash.c (rb_any_hash), rational.c (nurat_hash): use Murmurhash. [ruby-dev:37784] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-12* gc.c (vm_xmalloc, vm_xrealloc): comparisons had no meanings onnobu
platforms where size_t is unsigned. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-11 * gc.c (define_final, undefine_final): shouldn't add/remove finalizerusa
of forzen objects. * gc.c (undefine_final): should remove FL_FINALIZE flag. [ruby-dev:37964] (also see [ruby-dev:37959]) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-22* gc.c (define_final): cannot define finalizer for immediatenobu
values. [ruby-core:21500] * gc.c (define_final): freezes or hides internal values. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-19* gc.c (garbage_collect_with_gvl): suppress warnings.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-15* gc.c (gc_with_gvl): suppress warnings.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-14* gc.c (negative_size_allocation_error_with_gvl): abolish a warning.akr
(negative_size_allocation_error): ditto. * ext/openssl/ossl.c (ossl_raise): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-12* gc.c (ruby_xmalloc, ruby_xrealloc, ruby_xfree):ko1
enable to use them without GVL. if GC is invoked, acquire GVL during GC. if NoMemoryError is raised, acquire GVL and raise it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-09* compile.c (iseq_compile_each), gc.c (assign_heap_slot),nobu
(gc_mark_children), parse.y (vtable_alloc, vtable_free, vtable_add), proc.c (proc_to_s), thread.c (terminate_i, rb_thread_terminate_all), (thread_start_func_2, blocking_region_begin, blocking_region_end), (rb_thread_kill), thread_pthread.c (native_thread_create), (ubf_pthread_cond_signal), vm.c (check_env, thread_free), vm_dump.c (vm_env_dump_raw, vm_stack_dump_each, vm_thread_dump_state), (vm_call0): use void pointer for %p. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-27* gc.c (gc_mark): still needs to check stack depth during GC.matz
* gc.c (stack_check): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-27* gc.c (ruby_stack_check): no check if using sigaltstack.nobu
* signal.c (register_sigaltstack): minimum size is insufficient for method calls. * signal.c (sigsegv): handles stack overflow if possible. * thread.c (ruby_thread_stack_overflow): helper function to raise sysstack_error. * thread_pthread.c (ruby_stack_overflowed_p): checks for stack overflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-07* include/ruby/io.h (rb_io_t): added write_lock to serialize.nobu
[ruby-core:19668] * gc.c (gc_mark_children): mark write_lock. * gc.c (rb_gc_call_finalizer_at_exit): Mutex also needs to be deferred. * io.c (io_fflush, io_binwrite, fptr_finalize): serializes writing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-25* gc.c (gc_profile_result): bug fix. The millisecond is 1/1000.nari
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-09 * include/ruby/ruby.h: embeds the elements of an array into itsyugui
struct RArray for # of elements <= 3. * array.c: ditto. * gc.c (gc_mark_children): following the change of struct RArray. * ext/tk/tcltklib.c (ip_ruby_cmp): ditto. * parse.y (coverage): ditto. * proc.c (curry): ditto. * .gdbinit: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-06* gc.c (gc_mark_children): ignores T_ZOMBIE.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04* dln.c: Ruby no longer supports MS-DOS.yugui
* ext/sdbm/_sdbm.c: ditto. * ext/sdbm/sdbm.h: ditto. * gc.c: ditto. * hash.c: ditto. * include/ruby/defines.h: ditto. * include/ruby/util.h: ditto. * io.c: ditto. * process.c: ditto. * ruby.c: ditto. * strftime.c: ditto. * util.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04* djgpp/GNUmakefile.in: removed. Ruby no longer supports djgpp.yugui
* djgpp/README.djgpp: ditto. * djgpp/config.hin: ditto. * djgpp/config.sed: ditto. * djgpp/configure.bat: ditto. * djgpp/mkver.sed: ditto. * ext/Setup.dj: ditto. * dln.c: removed djgpp supports. * file.c: ditto. * gc.c: ditto. * io.c: ditto. * process.c: ditto. * ruby.c: ditto. * signal.c: ditto. * util.c: ditto. * vm_core.h: ditto. * lib/fileutils.rb: ditto. * lib/mkmf.rb: ditto. * ext/socket/socket.c: ditto. * test/fileutils/test_fileutils.rb: ditto. * test/ruby/test_env.rb: ditto. * test/ruby/test_path.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04* x68/_dtos18.c: removed. Ruby no longer supports human68k.yugui
* x68/_round.c: ditto. * x68/fconvert.c: ditto. * x68/select.c: ditto. * ext/Setup.x68: ditto. * missing/x68.c: ditto. * dln.c (dln_find_exe_r): removed human68k supports. (dln_find_1): ditto. * lib/mkmf.rb: ditto. * ext/extmk.rb (Init_ext): ditto. * ext/socket/socket.c (init_sock): ditto. * gc.c (GC_MALLOC_LIMIT): ditto. (rb_setjmp, rb_jmpbuf): ditto. (mark_current_machine_context): ditto. * include/ruby/defines.h (PATH_ENV): ditto. * io.c: ditto. * process.c: ditto. * ruby.c: ditto. * test/ruby/test_env.rb: ditto. * test/ruby/test_path.rb: ditto. * LEGAL git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-01* gc.c (rb_gc_call_finalizer_at_exit): finalize deferred IO and Data.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-01* gc.c (rb_gc_call_finalizer_at_exit): deffers IO finalization.nobu
[ruby-dev:36646] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-23* include/ruby/node.h, node.h: move node.h from include path.ko1
This change stop to install node.h beacuase of saving ABI (node.h will be changed. Extensions should not depends on this file). * blockinlining.c, class.c, compile.c, debug.h, enum.c, gc.c, iseq.c, parse.y, ruby.c, signal.c, variable.c, vm.c, vm_core.h, vm_dump.c: ditto. * ext/ripper/depend: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-20 * complex.c: an instance method image has been removed andtadf
uses "imag" instead of "image". * complex.c: two instance method re and im are removed. * rational.c: follows the above changes. * include/ruby/ruby.h: ditto. * gc.c: ditto. * lib/cmath.rb: ditto. * lib/mathn.rb: ditto. * lib/complex.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e