summaryrefslogtreecommitdiff
path: root/libguile/gc-malloc.c
AgeCommit message (Collapse)AuthorFilesLines
2005-01-24Reverted changed from 2005/01/24 19:14:54, which was a commit to theMarius Vollmer1-10/+12
wrong branch. Sorry.
2005-01-24Threading changes.Marius Vollmer1-12/+10
2004-08-19* gc.h, gc.c (scm_i_gc_admin_mutex): New, to protectMarius Vollmer1-5/+19
scm_gc_mallocated, for now. (scm_init_storage): Initialize it. * gc-malloc.c (descrease_mtrigger, increase_mtrigger): Use it. * gc-mark.c (scm_gc_mark_dependencies): Call scm_i_string_mark, scm_i_stringbuf_mark and scm_i_symbol_mark, as appropriate. * gc-card.c (scm_i_sweep_card): Call scm_i_string_free, scm_i_stringbuf_free and scm_i_symbol_free, as appropriate.
2004-02-16Add a copyright year.Kevin Ryde1-1/+1
2004-02-16(scm_done_malloc, scm_done_free): Allow negative sizes,Kevin Ryde1-3/+9
which were permitted in the past for these.
2003-07-09(scm_gc_realloc): Define "ptr" at start of function.Kevin Ryde1-1/+3
2003-07-06(decrease_mtrigger): new functionHan-Wen Nienhuys1-13/+35
(increase_mtrigger): new function, separate debug registering and mtrigger administration. (scm_gc_realloc): bugfix: do mtrigger administration before the actual realloc, for the realloc might invalidate a GC-d segment of memory. Thanks to Sam Hocevar for pointing this out. (scm_gc_realloc): use scm_malloc_reregister instead of unregistering and registering in sequence.
2003-05-14(scm_gc_register_collectable_memory): avoidHan-Wen Nienhuys1-2/+11
wrap-around for scm_mtrigger (scm_gc_register_collectable_memory): abort on overflowing scm_mallocated().
2003-04-05Changed license terms to the plain LGPL thru-out.Marius Vollmer1-35/+11
2003-03-25* gc-malloc.c: #include <config.h> if HAVE_CONFIG_H.Rob Browning1-0/+4
2002-12-21* gc.c, gc.h (scm_i_sweep_mutex): New mutex.Mikael Djurfeldt1-11/+15
* gc.c (scm_gc_for_newcell), gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory): Substitute locking of scm_i_sweep_mutex for calls to scm_i_thread_put_to_sleep. (scm_igc): Lock sweep mutex here instead of in callers; Calls to scm_i_thread_put_to_sleep/scm_i_thread_wake_up used to demarkate the single-thread section (which now only contains the mark phase). (scm_gc): Don't lock sweeo mutex here since scm_igc locks it; Removed SCM_DEFER/ALLOW_INTS. Simply call scm_igc directly. * threads.c (gc_section_mutex): Removed.
2002-12-11* gc-malloc.c, gc.h, init.c: Reverted gc-malloc change ofMikael Djurfeldt1-16/+0
2002-12-10.
2002-12-10* gc-malloc.c, gc.h (scm_gc_malloc_prehistory): New function.Mikael Djurfeldt1-3/+7
* gc-malloc.c (malloc_mutex): New mutex. (scm_gc_malloc_prehistory): Initialize it. (scm_realloc): Serialize call to realloc (scm_calloc): Same for calloc. Thanks to Wolfgang Jaehrling! (Now we have to make sure all calls to malloc/realloc are made through scm_malloc.) * init.c (scm_init_guile_1): Call scm_gc_malloc_prehistory.
2002-12-10* gc-malloc.c (malloc_mutex): New mutex.Mikael Djurfeldt1-0/+12
(scm_gc_init_malloc): Initialize it. (scm_realloc): Serialize call to realloc (scm_calloc): Same for calloc. Thanks to Wolfgang Jaehrling! (Now we have to make sure all calls to malloc/realloc are made through scm_malloc.)
2002-12-09* __scm.h (SCM_ALLOW_INTS_ONLY): Removed.Mikael Djurfeldt1-3/+15
(SCM_NONREC_CRITICAL_SECTION_START, SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START, SCM_REC_CRITICAL_SECTION_END): New macros. (SCM_CRITICAL_SECTION_START/END): Defined here. * eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around the three calls to scm_m_expand_body. * gc.h: #include "libguile/pthread-threads.h"; (SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros. * gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type scm_t_key; * gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist access. * gc-freelist.c (scm_gc_init_freelist): Create freelist keys. * gc-freelist.c, threads.c (really_launch): Use SCM_FREELIST_CREATE. * gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory): * gc.c (scm_i_expensive_validation_check, scm_gc, scm_gc_for_newcell): Put threads to sleep before doing GC-related heap administration so that those pieces of code are executed single-threaded. We might consider rewriting these code sections in terms of a "call_gc_code_singly_threaded" construct instead of calling the pair of scm_i_thread_put_to_sleep () and scm_i_thread_wake_up (). Also, we would want to have as many of these sections eleminated. * init.c (scm_init_guile_1): Call scm_threads_prehistory. * inline.h: #include "libguile/threads.h" * pthread-threads.h: Macros now conform more closely to the pthreads interface. Some of them now take a second argument. * threads.c, threads.h: Many changes. * configure.in: Temporarily replaced "copt" threads option with new option "pthreads". (USE_PTHREAD_THREADS): Define if pthreads configured.
2002-09-09(scm_gc_register_collectable_memory): more overflowHan-Wen Nienhuys1-2/+2
protection.
2002-09-05* gc-segment.c (scm_i_make_initial_segment): check user settingsHan-Wen Nienhuys1-1/+12
for sanity. * gc-malloc.c (scm_gc_init_malloc): check user settings for sanity. (scm_gc_register_collectable_memory): prevent overflow of memory counts. * gc-freelist.c (scm_init_freelist): check user settings for sanity. * gc-malloc.c (scm_gc_register_collectable_memory): use floats; these won't ever wrap around with high memory usage. * gc-freelist.c: include <stdio.h> * gc-malloc.c: add DEBUGINFO for mtrigger GCs.
2002-09-05* struct.h: change scm_structs_to_free to scm_i_structs_to_freeHan-Wen Nienhuys1-2/+4
* gc-malloc.c (scm_gc_register_collectable_memory): use floats; these won't ever wrap around with high memory usage. * gc-malloc.c: add DEBUGINFO for mtrigger GCs.
2002-09-05add DEBUGINFO for mtrigger GCs.Han-Wen Nienhuys1-7/+7
2002-08-28* gc.h: remove DOUBLECELL card flags.Han-Wen Nienhuys1-1/+11
* gc-malloc.c (scm_calloc): try to use calloc() before calling scm_realloc(). * gc-segment.c (scm_i_initialize_heap_segment_data): remove card init loop; handle this from scm_init_card_freelist() * gc-card.c (scm_init_card_freelist): init bit vector here.
2002-08-08* gc-card.c ("sweep_card"): remove SCM_MISC_ERROR messages: printHan-Wen Nienhuys1-1/+4
message and abort. * gc-mark.c ("scm_gc_mark_dependencies"): idem.
2002-08-05* tests/reader.test: change misc-error in read-error.Han-Wen Nienhuys1-1/+13
* read.c (scm_input_error): new function: give meaningful error messages, and throw read-error * gc-malloc.c (scm_calloc): add scm_calloc. * scheme-memory.texi (Memory Blocks): add scm_calloc, scm_gc_calloc. correct typos.
2002-08-04(INPUT_ERROR): Prepare for file:line:column errorHan-Wen Nienhuys1-27/+16
messages for errors in scm_lreadr() and friends.
2002-08-04gc statistic tweaksHan-Wen Nienhuys1-5/+5
2002-08-04 more codeHan-Wen Nienhuys1-0/+407