source: trunk/ccl/lisp-kernel/gc.h @ 12

Last change on this file since 12 was 12, checked in by gb, 16 years ago

Handle new gc-traps for egc state changes.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.5 KB
Line 
1/*
2   Copyright (C) 1994-2001 Digitool, Inc
3   This file is part of OpenMCL. 
4
5   OpenMCL is licensed under the terms of the Lisp Lesser GNU Public
6   License , known as the LLGPL and distributed with OpenMCL as the
7   file "LICENSE".  The LLGPL consists of a preamble and the LGPL,
8   which is distributed with OpenMCL as the file "LGPL".  Where these
9   conflict, the preamble takes precedence. 
10
11   OpenMCL is referenced in the preamble as the "LIBRARY."
12
13   The LLGPL is also available online at
14   http://opensource.franz.com/preamble.html
15*/
16
17#ifndef __GC_H__
18#define __GC_H__ 1
19
20#include "lisp.h"
21#include "bits.h"
22#include "lisp-exceptions.h"
23#include "memprotect.h"
24
25
26#define is_node_fulltag(f)  ((1<<(f))&((1<<fulltag_cons)|(1<<fulltag_misc)))
27
28/*
29  A code-vector's header can't look like a valid instruction or UUO:
30  the low 8 bits must be subtag_code_vector, and the top 6 bits
31  must be 0.  That means that the maximum length of a code vector
32  is 18 bits worth of elements (~1MB.)
33*/
34
35#define code_header_mask ((0x3f<<26) | subtag_code_vector)
36
37pageentry *pagemap;
38
39extern LispObj GCarealow;
40extern unsigned GCndwords_in_area;
41extern bitvector GCmarkbits;
42LispObj *global_reloctab, *GCrelocptr;
43LispObj GCfirstunmarked;
44
45extern unsigned lisp_heap_gc_threshold;
46void mark_root(LispObj);
47void mark_pc_root(LispObj);
48void mark_locative_root(LispObj);
49void rmark(LispObj);
50unsigned skip_over_ivector(unsigned, LispObj);
51void mark_simple_area_range(LispObj *,LispObj *);
52LispObj calculate_relocation();
53LispObj locative_forwarding_address(LispObj);
54LispObj node_forwarding_address(LispObj);
55void forward_range(LispObj *, LispObj *);
56void note_memoized_references(ExceptionInformationPowerPC *,LogicalAddress, LogicalAddress, BytePtr *, BytePtr *);
57void gc(TCR *);
58int  purify(TCR *);
59int impurify(TCR *);
60void delete_protected_area(protected_area_ptr);
61Boolean egc_control(Boolean, BytePtr);
62Boolean free_segments_zero_filled_by_OS;
63
64
65
66#define area_dword(w,low) ((((LispObj)w) - (LispObj)low)>>3)
67#define gc_area_dword(w)  area_dword(w,GCarealow)
68
69#define forward_marker fulltag_nil
70
71#define VOID_ALLOCPTR 0xFFFFFFF8
72
73
74#define GC_TRAP_FUNCTION_GC 0
75#define GC_TRAP_FUNCTION_PURIFY 1
76#define GC_TRAP_FUNCTION_IMPURIFY 2
77#define GC_TRAP_FLAG_COMPRESS 4
78#define GC_TRAP_FUNCTION_SAVE_APPLICATION 8
79
80#define GC_TRAP_FUNCTION_GET_LISP_HEAP_THRESHOLD 16
81#define GC_TRAP_FUNCTION_SET_LISP_HEAP_THRESHOLD 17
82#define GC_TRAP_FUNCTION_USE_LISP_HEAP_THRESHOLD 18
83#define GC_TRAP_FUNCTION_EGC_CONTROL 32
84#define GC_TRAP_FUNCTION_CONFIGURE_EGC 64
85
86#endif                          /* __GC_H__ */
Note: See TracBrowser for help on using the repository browser.