#include "xsb_config.h"
#include "xsb_debug.h"
#include <string.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <time.h>
#include "auxlry.h"
#include "cell_xsb.h"
#include "memory_xsb.h"
#include "inst_xsb.h"
#include <stdio.h>
#include "register.h"
#include "psc_xsb.h"
#include "tries.h"
#include "choice.h"
#include "error_xsb.h"
#include "macro_xsb.h"
#include "realloc.h"
#include "flags_xsb.h"
#include "heap_xsb.h"
#include "io_builtins_xsb.h"
#include "subp.h"
#include "binding.h"
#include "thread_xsb.h"
#include "debug_xsb.h"
#include "loader_xsb.h"
#include "struct_manager.h"
#include "hash_xsb.h"
#include "gc_profile.h"
#include "gc_mark.h"
#include "gc_print.h"
#include "gc_slide.h"
#include "gc_copy.h"
Defines | |
#define | print_on_gc 0 |
#define | AUTO_STRING_GC_NTH 10 |
#define | stack_boundaries |
#define | points_into_heap(p) ((heap_bot <= p) && (p < heap_top)) |
#define | points_into_ls(p) ((ls_top <= p) && (p <= ls_bot)) |
#define | points_into_cp(p) ((cp_top <= p) && (p <= cp_bot)) |
#define | points_into_tr(p) ((tr_bot <= p) && (p <= tr_top)) |
#define | points_into_compl(p) ((compl_top <= p) && (p <= compl_bot)) |
#define | INDIRECTION_SLIDE |
#define | MARKED 1 |
#define | TRAIL_PRE 2 |
#define | CHAIN_BIT 4 |
#define | testreturnit(retp) return(retp) |
Functions | |
void | extend_enc_dec_as_nec (void *, void *) |
void | free_unused_strings () |
void | mark_nonheap_strings (CTXTdecl) |
int | should_gc_strings () |
xsbBool | glstack_realloc (CTXTdeclc int new_size, int arity) |
int | gc_heap (CTXTdeclc int arity, int ifStringGC) |
xsbBool | glstack_ensure_space (CTXTdeclc int extra, int arity) |
Variables | |
static xsbBool | slide |
static int | heap_early_reset |
static int | ls_early_reset |
static int | printnum = 0 |
int | gc_strings = FALSE |
static long | last_string_space_size = 10000 |
static long | last_assert_space_size = 10000 |
static CPtr | heap_bot |
static CPtr | heap_top |
static CPtr | ls_bot |
static CPtr | ls_top |
static CPtr | tr_bot |
static CPtr | tr_top |
static CPtr | cp_bot |
static CPtr | cp_top |
static CPtr | compl_top |
static CPtr | compl_bot |
static unsigned long | heap_marks_size |
static double | total_time_gc = 0 |
static unsigned long | total_collected = 0 |
static int | num_gc = 0 |
static char * | heap_marks = NULL |
static char * | ls_marks = NULL |
static char * | tr_marks = NULL |
static char * | cp_marks = NULL |
static CPtr * | slide_buf = NULL |
static unsigned long | slide_top = 0 |
static int | slide_buffering = 0 |
static unsigned long | slide_buf_size = 0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Value: heap_top = hreg; \ ls_top = top_of_localstk - 256; /* extra space for environment above top */ \ if (ls_top < heap_top) xsb_exit("Heap and local stack are clobbered"); \ heap_bot = (CPtr)glstack.low ; \ ls_bot = (CPtr)glstack.high - 1 ; \ tr_top = (CPtr)(top_of_trail) /*- 1*/ ; \ tr_bot = (CPtr)tcpstack.low ; \ cp_bot = (CPtr)tcpstack.high - 1 ; \ cp_top = top_of_cpstack ; \ compl_top = (CPtr)complstack.low ; /* NOT top_of_complstk !!! */\ compl_bot = (CPtr)complstack.high ; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|