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

Last change on this file since 557 was 557, checked in by gb, 15 years ago

PPC64 changes (some of them rather suspect ...). 32-bit kernel may be a
little funky ...

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.6 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 GCndnodes_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);
50LispObj *skip_over_ivector(LispObj, 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_dnode(w,low) (((ptr_to_lispobj(w)) - ptr_to_lispobj(low))>>dnode_shift)
67#define gc_area_dnode(w)  area_dnode(w,GCarealow)
68
69#ifdef PPC64
70#define forward_marker subtag_forward_marker
71#else
72#define forward_marker fulltag_nil
73#endif
74
75#define VOID_ALLOCPTR ((LispObj)(-dnode_size))
76
77
78#define GC_TRAP_FUNCTION_GC 0
79#define GC_TRAP_FUNCTION_PURIFY 1
80#define GC_TRAP_FUNCTION_IMPURIFY 2
81#define GC_TRAP_FLAG_COMPRESS 4
82#define GC_TRAP_FUNCTION_SAVE_APPLICATION 8
83
84#define GC_TRAP_FUNCTION_GET_LISP_HEAP_THRESHOLD 16
85#define GC_TRAP_FUNCTION_SET_LISP_HEAP_THRESHOLD 17
86#define GC_TRAP_FUNCTION_USE_LISP_HEAP_THRESHOLD 18
87#define GC_TRAP_FUNCTION_EGC_CONTROL 32
88#define GC_TRAP_FUNCTION_CONFIGURE_EGC 64
89
90#endif                          /* __GC_H__ */
Note: See TracBrowser for help on using the repository browser.