mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-06 15:40:29 +02:00
* gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of
2002-12-10.
This commit is contained in:
parent
392d2833a2
commit
e200ddeeb2
4 changed files with 3 additions and 18 deletions
|
@ -1,5 +1,8 @@
|
||||||
2002-12-11 Mikael Djurfeldt <mdj@kvast.blakulla.net>
|
2002-12-11 Mikael Djurfeldt <mdj@kvast.blakulla.net>
|
||||||
|
|
||||||
|
* gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of
|
||||||
|
2002-12-10.
|
||||||
|
|
||||||
* gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists.
|
* gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists.
|
||||||
|
|
||||||
* gc.c (scm_gc_sweep): Call it here instead, which is a more
|
* gc.c (scm_gc_sweep): Call it here instead, which is a more
|
||||||
|
|
|
@ -99,14 +99,6 @@ extern unsigned long * __libc_ia64_register_backing_store_base;
|
||||||
|
|
||||||
static int scm_i_minyield_malloc;
|
static int scm_i_minyield_malloc;
|
||||||
|
|
||||||
static scm_t_mutex malloc_mutex;
|
|
||||||
|
|
||||||
void
|
|
||||||
scm_gc_malloc_prehistory ()
|
|
||||||
{
|
|
||||||
scm_i_plugin_mutex_init (&malloc_mutex, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
scm_gc_init_malloc (void)
|
scm_gc_init_malloc (void)
|
||||||
{
|
{
|
||||||
|
@ -134,9 +126,7 @@ scm_realloc (void *mem, size_t size)
|
||||||
{
|
{
|
||||||
void *ptr;
|
void *ptr;
|
||||||
|
|
||||||
scm_i_plugin_mutex_lock (&malloc_mutex);
|
|
||||||
SCM_SYSCALL (ptr = realloc (mem, size));
|
SCM_SYSCALL (ptr = realloc (mem, size));
|
||||||
scm_i_plugin_mutex_unlock (&malloc_mutex);
|
|
||||||
if (ptr)
|
if (ptr)
|
||||||
return ptr;
|
return ptr;
|
||||||
|
|
||||||
|
@ -144,9 +134,7 @@ scm_realloc (void *mem, size_t size)
|
||||||
|
|
||||||
scm_i_sweep_all_segments ("realloc");
|
scm_i_sweep_all_segments ("realloc");
|
||||||
|
|
||||||
scm_i_plugin_mutex_lock (&malloc_mutex);
|
|
||||||
SCM_SYSCALL (ptr = realloc (mem, size));
|
SCM_SYSCALL (ptr = realloc (mem, size));
|
||||||
scm_i_plugin_mutex_unlock (&malloc_mutex);
|
|
||||||
if (ptr)
|
if (ptr)
|
||||||
{
|
{
|
||||||
scm_i_thread_wake_up ();
|
scm_i_thread_wake_up ();
|
||||||
|
@ -158,9 +146,7 @@ scm_realloc (void *mem, size_t size)
|
||||||
|
|
||||||
scm_i_thread_wake_up ();
|
scm_i_thread_wake_up ();
|
||||||
|
|
||||||
scm_i_plugin_mutex_lock (&malloc_mutex);
|
|
||||||
SCM_SYSCALL (ptr = realloc (mem, size));
|
SCM_SYSCALL (ptr = realloc (mem, size));
|
||||||
scm_i_plugin_mutex_unlock (&malloc_mutex);
|
|
||||||
if (ptr)
|
if (ptr)
|
||||||
return ptr;
|
return ptr;
|
||||||
|
|
||||||
|
@ -186,9 +172,7 @@ scm_calloc (size_t sz)
|
||||||
By default, try to use calloc, as it is likely more efficient than
|
By default, try to use calloc, as it is likely more efficient than
|
||||||
calling memset by hand.
|
calling memset by hand.
|
||||||
*/
|
*/
|
||||||
scm_i_plugin_mutex_lock (&malloc_mutex);
|
|
||||||
SCM_SYSCALL(ptr= calloc (sz, 1));
|
SCM_SYSCALL(ptr= calloc (sz, 1));
|
||||||
scm_i_plugin_mutex_unlock (&malloc_mutex);
|
|
||||||
if (ptr)
|
if (ptr)
|
||||||
return ptr;
|
return ptr;
|
||||||
|
|
||||||
|
|
|
@ -372,7 +372,6 @@ SCM_API void scm_gc_register_root (SCM *p);
|
||||||
SCM_API void scm_gc_unregister_root (SCM *p);
|
SCM_API void scm_gc_unregister_root (SCM *p);
|
||||||
SCM_API void scm_gc_register_roots (SCM *b, unsigned long n);
|
SCM_API void scm_gc_register_roots (SCM *b, unsigned long n);
|
||||||
SCM_API void scm_gc_unregister_roots (SCM *b, unsigned long n);
|
SCM_API void scm_gc_unregister_roots (SCM *b, unsigned long n);
|
||||||
SCM_API void scm_gc_malloc_prehistory (void);
|
|
||||||
SCM_API int scm_init_storage (void);
|
SCM_API int scm_init_storage (void);
|
||||||
SCM_API void *scm_get_stack_base (void);
|
SCM_API void *scm_get_stack_base (void);
|
||||||
SCM_API void scm_init_gc (void);
|
SCM_API void scm_init_gc (void);
|
||||||
|
|
|
@ -444,7 +444,6 @@ scm_init_guile_1 (SCM_STACKITEM *base)
|
||||||
|
|
||||||
scm_block_gc = 1;
|
scm_block_gc = 1;
|
||||||
|
|
||||||
scm_gc_malloc_prehistory ();
|
|
||||||
scm_threads_prehistory ();
|
scm_threads_prehistory ();
|
||||||
scm_ports_prehistory ();
|
scm_ports_prehistory ();
|
||||||
scm_smob_prehistory ();
|
scm_smob_prehistory ();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue