Back to index

plt-scheme  4.2.1
Defines | Typedefs | Functions | Variables
gc.h File Reference
#include "gc_config_macros.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define GC_PROTO(args)   ()
#define GC_CONST
#define GC_TIME_UNLIMITED   999999
#define GC_PROTECTS_POINTER_HEAP   1 /* May protect non-atomic objs. */
#define GC_PROTECTS_PTRFREE_HEAP   2
#define GC_PROTECTS_STATIC_DATA   4 /* Curently never. */
#define GC_PROTECTS_STACK   8 /* Probably impractical. */
#define GC_PROTECTS_NONE   0
#define GC_EXTRAS   __FILE__, __LINE__
#define GC_EXTRA_PARAMS   GC_CONST char * s, int i
#define GC_MALLOC(sz)   GC_malloc(sz)
#define GC_MALLOC_ATOMIC(sz)   GC_malloc_atomic(sz)
#define GC_STRDUP(s)   GC_strdup(s)
#define GC_MALLOC_UNCOLLECTABLE(sz)   GC_malloc_uncollectable(sz)
#define GC_MALLOC_IGNORE_OFF_PAGE(sz)   GC_malloc_ignore_off_page(sz)
#define GC_MALLOC_ATOMIC_IGNORE_OFF_PAGE(sz)   GC_malloc_atomic_ignore_off_page(sz)
#define GC_REALLOC(old, sz)   GC_realloc(old, sz)
#define GC_FREE(p)   GC_free(p)
#define GC_REGISTER_FINALIZER(p, f, d, of, od)   GC_register_finalizer(p, f, d, of, od)
#define GC_REGISTER_FINALIZER_IGNORE_SELF(p, f, d, of, od)   GC_register_finalizer_ignore_self(p, f, d, of, od)
#define GC_REGISTER_FINALIZER_NO_ORDER(p, f, d, of, od)   GC_register_finalizer_no_order(p, f, d, of, od)
#define GC_MALLOC_STUBBORN(sz)   GC_malloc_stubborn(sz)
#define GC_CHANGE_STUBBORN(p)   GC_change_stubborn(p)
#define GC_END_STUBBORN_CHANGE(p)   GC_end_stubborn_change(p)
#define GC_GENERAL_REGISTER_DISAPPEARING_LINK(link, obj)   GC_general_register_disappearing_link(link, obj)
#define GC_REGISTER_DISPLACEMENT(n)   GC_register_displacement(n)
#define GC_NEW(t)   (t *)GC_MALLOC(sizeof (t))
#define GC_NEW_ATOMIC(t)   (t *)GC_MALLOC_ATOMIC(sizeof (t))
#define GC_NEW_STUBBORN(t)   (t *)GC_MALLOC_STUBBORN(sizeof (t))
#define GC_NEW_UNCOLLECTABLE(t)   (t *)GC_MALLOC_UNCOLLECTABLE(sizeof (t))
#define GC_PTR_ADD3(x, n, type_of_result)   ((x)+(n))
#define GC_PTR_ADD(x, n)   ((x)+(n))
#define GC_PRE_INCR3(x, n, type_of_result)   ((x) += (n))
#define GC_PRE_INCR(x, n)   ((x) += (n))
#define GC_POST_INCR2(x, n, type_of_result)   ((x)++)
#define GC_POST_INCR(x, n)   ((x)++)
#define GC_PTR_STORE(p, q)   *((p) = (q))
#define GC_INIT()

Typedefs

typedef char * GC_PTR
typedef unsigned long GC_word
typedef long GC_signed_word
typedef int GC_stop_func GC_PROTO ((void)) = (void (*) GC_PROTO((void)))0
typedef void(* GC_collect_start_callback_Proc )(void)
typedef void(* GC_collect_end_callback_Proc )(void)

Functions

GC_API GC_PTR GC_oom_fn GC_PROTO ((size_t bytes_requested))
GC_API void GC_finalizer_notifier GC_PROTO ((void))
GC_API GC_PTR GC_malloc GC_PROTO ((size_t size_in_bytes))
GC_API char *GC_strdup GC_PROTO ((const char *str))
GC_API void GC_free GC_PROTO ((GC_PTR object_addr))
GC_API void GC_change_stubborn GC_PROTO ((GC_PTR))
GC_API GC_PTR GC_base GC_PROTO ((GC_PTR displaced_pointer))
GC_API GC_PTR GC_realloc GC_PROTO ((GC_PTR old_object, size_t new_size_in_bytes))
GC_API int GC_expand_hp GC_PROTO ((size_t number_of_bytes))
GC_API void GC_set_max_heap_size GC_PROTO ((GC_word n))
GC_API void GC_exclude_static_roots GC_PROTO ((GC_PTR start, GC_PTR finish))
GC_API void GC_add_roots GC_PROTO ((char *low_address, char *high_address_plus_1))
GC_API int GC_try_to_collect GC_PROTO ((GC_stop_func stop_func))
GC_API GC_PTR
GC_malloc_ignore_off_page 
GC_PROTO ((size_t lb))
GC_API GC_PTR GC_debug_malloc GC_PROTO ((size_t size_in_bytes, GC_EXTRA_PARAMS))
GC_API char *GC_debug_strdup GC_PROTO ((const char *str, GC_EXTRA_PARAMS))
GC_API GC_PTR GC_debug_realloc GC_PROTO ((GC_PTR old_object, size_t new_size_in_bytes, GC_EXTRA_PARAMS))
GC_API GC_PTR
GC_debug_realloc_replacement 
GC_PROTO ((GC_PTR object_addr, size_t size_in_bytes))
GC_API void GC_register_finalizer GC_PROTO ((GC_PTR obj, GC_finalization_proc fn, GC_PTR cd, GC_finalization_proc *ofn, GC_PTR *ocd))
GC_API void
GC_register_eager_finalizer 
GC_PROTO ((GC_PTR obj, int eager_level, GC_finalization_proc fn, GC_PTR cd, GC_finalization_proc *ofn, GC_PTR *ocd))
GC_API int
GC_register_disappearing_link 
GC_PROTO ((GC_PTR *))
GC_API int
GC_general_register_disappearing_link 
GC_PROTO ((GC_PTR *, GC_PTR obj))
GC_API GC_warn_proc
GC_set_warn_proc 
GC_PROTO ((GC_warn_proc p))
GC_API GC_word
GC_set_free_space_divisor 
GC_PROTO ((GC_word value))
GC_API GC_PTR
GC_call_with_alloc_lock 
GC_PROTO ((GC_fn_type fn, GC_PTR client_data))
GC_API GC_PTR GC_same_obj GC_PROTO ((GC_PTR p, GC_PTR q))
GC_API GC_PTR GC_pre_incr GC_PROTO ((GC_PTR *p, size_t how_much))
GC_API GC_PTR GC_is_visible GC_PROTO ((GC_PTR p))
GC_API
GC_collect_start_callback_Proc 
GC_set_collect_start_callback (GC_collect_start_callback_Proc)
GC_API GC_collect_end_callback_Proc GC_set_collect_end_callback (GC_collect_end_callback_Proc)
GC_API int GC_did_mark_stack_overflow (void)
GC_API void GC_mark_from_mark_stack (void)
GC_API void GC_mark_overflow_recover (void *p)
GC_API void GC_flush_mark_stack (void)
GC_API long GC_get_memory_use (void)
GC_API void GC_pre_init (void)

Variables

GC_API GC_word GC_gc_no
GC_API int GC_parallel
GC_API int GC_find_leak
GC_API int GC_all_interior_pointers
GC_API int GC_quiet
GC_API int GC_finalize_on_demand
GC_API int GC_java_finalization
GC_API int GC_dont_gc
GC_API int GC_dont_expand
GC_API int GC_use_entire_heap
GC_API int GC_full_freq
GC_API GC_word GC_non_gc_bytes
GC_API int GC_no_dls
GC_API GC_word GC_free_space_divisor
GC_API GC_word GC_max_retries
GC_API char * GC_stackbottom
GC_API int GC_dont_precollect
GC_API unsigned long GC_time_limit
GC_API void(* GC_custom_finalize )(void)
GC_API void(* GC_push_last_roots )(void)
GC_API void(* GC_push_last_roots_again )(void)
GC_API void(* GC_out_of_memory )(void)

Define Documentation

#define GC_CHANGE_STUBBORN (   p)    GC_change_stubborn(p)

Definition at line 602 of file gc.h.

#define GC_CONST

Definition at line 42 of file gc.h.

Definition at line 603 of file gc.h.

#define GC_EXTRA_PARAMS   GC_CONST char * s, int i

Definition at line 518 of file gc.h.

#define GC_EXTRAS   __FILE__, __LINE__

Definition at line 517 of file gc.h.

#define GC_FREE (   p)    GC_free(p)

Definition at line 594 of file gc.h.

#define GC_GENERAL_REGISTER_DISAPPEARING_LINK (   link,
  obj 
)    GC_general_register_disappearing_link(link, obj)

Definition at line 604 of file gc.h.

#define GC_INIT ( )

Definition at line 999 of file gc.h.

#define GC_MALLOC (   sz)    GC_malloc(sz)

Definition at line 585 of file gc.h.

#define GC_MALLOC_ATOMIC (   sz)    GC_malloc_atomic(sz)

Definition at line 586 of file gc.h.

Definition at line 591 of file gc.h.

Definition at line 589 of file gc.h.

Definition at line 601 of file gc.h.

Definition at line 588 of file gc.h.

#define GC_NEW (   t)    (t *)GC_MALLOC(sizeof (t))

Definition at line 612 of file gc.h.

#define GC_NEW_ATOMIC (   t)    (t *)GC_MALLOC_ATOMIC(sizeof (t))

Definition at line 613 of file gc.h.

#define GC_NEW_STUBBORN (   t)    (t *)GC_MALLOC_STUBBORN(sizeof (t))

Definition at line 614 of file gc.h.

#define GC_NEW_UNCOLLECTABLE (   t)    (t *)GC_MALLOC_UNCOLLECTABLE(sizeof (t))

Definition at line 615 of file gc.h.

#define GC_POST_INCR (   x,
 
)    ((x)++)

Definition at line 861 of file gc.h.

#define GC_POST_INCR2 (   x,
  n,
  type_of_result 
)    ((x)++)

Definition at line 860 of file gc.h.

#define GC_PRE_INCR (   x,
 
)    ((x) += (n))

Definition at line 859 of file gc.h.

#define GC_PRE_INCR3 (   x,
  n,
  type_of_result 
)    ((x) += (n))

Definition at line 858 of file gc.h.

#define GC_PROTECTS_NONE   0

Definition at line 438 of file gc.h.

#define GC_PROTECTS_POINTER_HEAP   1 /* May protect non-atomic objs. */

Definition at line 433 of file gc.h.

#define GC_PROTECTS_PTRFREE_HEAP   2

Definition at line 434 of file gc.h.

#define GC_PROTECTS_STACK   8 /* Probably impractical. */

Definition at line 436 of file gc.h.

#define GC_PROTECTS_STATIC_DATA   4 /* Curently never. */

Definition at line 435 of file gc.h.

#define GC_PROTO (   args)    ()

Definition at line 40 of file gc.h.

#define GC_PTR_ADD (   x,
 
)    ((x)+(n))

Definition at line 857 of file gc.h.

#define GC_PTR_ADD3 (   x,
  n,
  type_of_result 
)    ((x)+(n))

Definition at line 856 of file gc.h.

#define GC_PTR_STORE (   p,
  q 
)    *((p) = (q))

Definition at line 874 of file gc.h.

#define GC_REALLOC (   old,
  sz 
)    GC_realloc(old, sz)

Definition at line 593 of file gc.h.

Definition at line 606 of file gc.h.

#define GC_REGISTER_FINALIZER (   p,
  f,
  d,
  of,
  od 
)    GC_register_finalizer(p, f, d, of, od)

Definition at line 595 of file gc.h.

#define GC_REGISTER_FINALIZER_IGNORE_SELF (   p,
  f,
  d,
  of,
  od 
)    GC_register_finalizer_ignore_self(p, f, d, of, od)

Definition at line 597 of file gc.h.

#define GC_REGISTER_FINALIZER_NO_ORDER (   p,
  f,
  d,
  of,
  od 
)    GC_register_finalizer_no_order(p, f, d, of, od)

Definition at line 599 of file gc.h.

#define GC_STRDUP (   s)    GC_strdup(s)

Definition at line 587 of file gc.h.

#define GC_TIME_UNLIMITED   999999

Definition at line 237 of file gc.h.


Typedef Documentation

Definition at line 1021 of file gc.h.

Definition at line 1020 of file gc.h.

mse *GC_array_mark_proc GC_PROTO ( (void ) = (void (*) GC_PROTO((void)))0 [read]

Definition at line 390 of file gc.h.

typedef char* GC_PTR

Definition at line 41 of file gc.h.

typedef long GC_signed_word

Definition at line 59 of file gc.h.

typedef unsigned long GC_word

Definition at line 58 of file gc.h.


Function Documentation

Definition at line 599 of file mark.c.

{
  return GC_mark_state == MS_INVALID;
}

Here is the caller graph for this function:

Definition at line 664 of file mark_rts.c.

Here is the caller graph for this function:

Definition at line 1198 of file misc.c.

{
  long c = 0;
  LOCK();
  GC_apply_to_all_blocks(get_size, (word)&c);
  UNLOCK();
  return c;
}

Here is the caller graph for this function:

Definition at line 603 of file mark.c.

Here is the caller graph for this function:

Definition at line 607 of file mark.c.

{
  GC_set_mark_bit(p);
  while (!GC_mark_some((ptr_t)0));
}

Here is the caller graph for this function:

GC_API GC_PTR GC_oom_fn GC_PROTO ( (size_t bytes_requested)  )

Definition at line 147 of file misc.c.

{
    return(0);
}

Definition at line 117 of file alloc.c.

{ return(0); }
GC_API GC_PTR GC_malloc GC_PROTO ( (size_t size_in_bytes)  )
GC_API char* GC_strdup GC_PROTO ( (const char *str)  )
GC_API void GC_free GC_PROTO ( (GC_PTR object_addr)  )
GC_API GC_PTR GC_base GC_PROTO ( (GC_PTR displaced_pointer)  )
GC_API GC_PTR GC_realloc GC_PROTO ( (GC_PTR old_object, size_t new_size_in_bytes)  )
GC_API int GC_expand_hp GC_PROTO ( (size_t number_of_bytes)  )
GC_API void GC_add_roots GC_PROTO ( (char *low_address, char *high_address_plus_1)  )
GC_API int GC_try_to_collect GC_PROTO ( (GC_stop_func stop_func)  )
GC_API GC_PTR GC_debug_malloc GC_PROTO ( (size_t size_in_bytes, GC_EXTRA_PARAMS )
GC_API GC_PTR GC_debug_realloc GC_PROTO ( (GC_PTR old_object, size_t new_size_in_bytes, GC_EXTRA_PARAMS )
GC_API GC_PTR GC_debug_realloc_replacement GC_PROTO ( (GC_PTR object_addr, size_t size_in_bytes)  )
GC_API GC_warn_proc GC_set_warn_proc GC_PROTO ( (GC_warn_proc p )
GC_API GC_PTR GC_call_with_alloc_lock GC_PROTO ( (GC_fn_type fn, GC_PTR client_data)  )
GC_API GC_PTR GC_pre_incr GC_PROTO ( (GC_PTR *p, size_t how_much)  )

Definition at line 331 of file alloc.c.

Definition at line 325 of file alloc.c.


Variable Documentation

Definition at line 101 of file gc.h.

Definition at line 1024 of file gc.h.

Definition at line 150 of file gc.h.

Definition at line 141 of file gc.h.

Definition at line 220 of file gc.h.

Definition at line 118 of file gc.h.

Definition at line 95 of file gc.h.

Definition at line 189 of file gc.h.

Definition at line 165 of file gc.h.

Definition at line 70 of file gc.h.

Definition at line 125 of file gc.h.

Definition at line 202 of file gc.h.

Definition at line 181 of file gc.h.

Definition at line 175 of file gc.h.

Definition at line 1029 of file gc.h.

Definition at line 73 of file gc.h.

Definition at line 1025 of file gc.h.

Definition at line 1026 of file gc.h.

Definition at line 113 of file gc.h.

Definition at line 208 of file gc.h.

GC_API unsigned long GC_time_limit

Definition at line 228 of file gc.h.

Definition at line 154 of file gc.h.