summaryrefslogtreecommitdiff
path: root/libguile/gc-malloc.c
AgeCommit message (Collapse)AuthorFilesLines
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