stk/Src/gc.h

47 lines
1.5 KiB
C
Raw Permalink Normal View History

1996-09-27 06:29:02 -04:00
/*
*
* g c . h -- Mark and Sweep Garbage Collector
*
*
1999-09-05 07:16:41 -04:00
* Copyright <EFBFBD> 1993-1999 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
1996-09-27 06:29:02 -04:00
*
*
1999-09-05 07:16:41 -04:00
* Permission to use, copy, modify, distribute,and license this
* software and its documentation for any purpose is hereby granted,
* provided that existing copyright notices are retained in all
* copies and that this notice is included verbatim in any
* distributions. No written agreement, license, or royalty fee is
* required for any of the authorized uses.
* This software is provided ``AS IS'' without express or implied
* warranty.
1996-09-27 06:29:02 -04:00
*
*
* Author: Erick Gallesio [eg@unice.fr]
* Creation date: 17-Feb-1993 12:27
1999-09-05 07:16:41 -04:00
* Last file update: 3-Sep-1999 20:20 (eg)
*
* Win32 DLL support by Steve Pruitt <steve@pruitt.net>
* - Modified stack_start_ptr and total_gc_time for IMPORT_DLL_GLOBALS
1996-09-27 06:29:02 -04:00
*
*/
#define GC_MARK 01 /* To mark a cell */
1999-09-05 07:16:41 -04:00
#if (defined(USE_DYNLOAD) && defined(MSC_VER) && defined(WIN32))
# ifdef IMPORT_DLL_GLOBALS
__declspec( dllimport ) SCM *STk_stack_start_ptr;
__declspec( dllimport ) double STk_total_gc_time;
# else
extern SCM *STk_stack_start_ptr;
extern double STk_total_gc_time;
# endif
#else
1996-09-27 06:29:02 -04:00
extern SCM *STk_stack_start_ptr;
extern double STk_total_gc_time;
1999-09-05 07:16:41 -04:00
#endif
1996-09-27 06:29:02 -04:00
void STk_gc_count_cells(long *allocated, long *used, long *calls);
void STk_mark_stack(SCM *start, SCM *end);
int STk_valid_address(SCM p); /* true if p is a valid address */
void STk_init_gc(void);