Back to index

plt-scheme  4.2.1
Classes | Defines | Typedefs | Variables
gc_hdrs.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  hce
struct  bi

Defines

#define LOG_BOTTOM_SZ   10
#define LOG_TOP_SZ   (WORDSZ - LOG_BOTTOM_SZ - LOG_HBLKSIZE)
#define TOP_SZ   (1 << LOG_TOP_SZ)
#define BOTTOM_SZ   (1 << LOG_BOTTOM_SZ)
#define USE_HDR_CACHE
#define ADVANCE(p, hhdr, source)
#define HC_HIT()
#define HC_MISS()
#define HDR_CACHE_SIZE   8 /* power of 2 */
#define DECLARE_HDR_CACHE   hdr_cache_entry hdr_cache[HDR_CACHE_SIZE]
#define INIT_HDR_CACHE   BZERO(hdr_cache, sizeof(hdr_cache));
#define HCE(h)   hdr_cache + (((word)(h) >> LOG_HBLKSIZE) & (HDR_CACHE_SIZE-1))
#define HCE_VALID_FOR(hce, h)
#define HCE_HDR(h)   ((hce) -> hce_hdr)
#define HC_GET_HDR(p, hhdr, source)
#define MAX_JUMP   (HBLKSIZE - 1)
#define HDR_FROM_BI(bi, p)   ((bi)->index[((word)(p) >> LOG_HBLKSIZE) & (BOTTOM_SZ - 1)])
#define BI(p)
#define HDR_INNER(p)   HDR_FROM_BI(BI(p),p)
#define HDR(p)   HDR_INNER(p)
#define GET_BI(p, bottom_indx)   (bottom_indx) = BI(p)
#define GET_HDR(p, hhdr)   (hhdr) = HDR(p)
#define SET_HDR(p, hhdr)   HDR_INNER(p) = (hhdr)
#define GET_HDR_ADDR(p, ha)   (ha) = &(HDR_INNER(p))
#define IS_FORWARDING_ADDR_OR_NIL(hhdr)   ((unsigned long) (hhdr) <= MAX_JUMP)
#define FORWARDED_ADDR(h, hhdr)   ((struct hblk *)(h) - (unsigned long)(hhdr))

Typedefs

typedef struct hblkhdr
typedef struct hce hdr_cache_entry
typedef struct bi bottom_index

Variables

hdrGC_invalid_header

Class Documentation

struct hce

Definition at line 89 of file gc_hdrs.h.

Collaboration diagram for hce:
Class Members
word block_addr
hdr * hce_hdr
struct bi

Definition at line 146 of file gc_hdrs.h.

Collaboration diagram for bi:
Class Members
struct bi * asc_link
struct bi * desc_link
hdr * index
word key

Define Documentation

#define ADVANCE (   p,
  hhdr,
  source 
)
Value:
{ \
	      hdr * new_hdr = GC_invalid_header; \
              p = GC_find_start(p, hhdr, &new_hdr); \
             hhdr = new_hdr; \
           }

Definition at line 70 of file gc_hdrs.h.

#define BI (   p)
Value:

Definition at line 186 of file gc_hdrs.h.

#define BOTTOM_SZ   (1 << LOG_BOTTOM_SZ)

Definition at line 55 of file gc_hdrs.h.

Definition at line 96 of file gc_hdrs.h.

#define FORWARDED_ADDR (   h,
  hhdr 
)    ((struct hblk *)(h) - (unsigned long)(hhdr))

Definition at line 232 of file gc_hdrs.h.

#define GET_BI (   p,
  bottom_indx 
)    (bottom_indx) = BI(p)

Definition at line 194 of file gc_hdrs.h.

#define GET_HDR (   p,
  hhdr 
)    (hhdr) = HDR(p)

Definition at line 195 of file gc_hdrs.h.

#define GET_HDR_ADDR (   p,
  ha 
)    (ha) = &(HDR_INNER(p))

Definition at line 197 of file gc_hdrs.h.

#define HC_GET_HDR (   p,
  hhdr,
  source 
)
Value:
{ \
	  hdr_cache_entry * hce = HCE(p); \
         if (HCE_VALID_FOR(hce, p)) { \
           HC_HIT(); \
           hhdr = hce -> hce_hdr; \
         } else { \
           HC_MISS(); \
           GET_HDR(p, hhdr); \
            if (IS_FORWARDING_ADDR_OR_NIL(hhdr)) { \
             ADVANCE(p, hhdr, source); \
           } else { \
	      hce -> block_addr = (word)(p) >> LOG_HBLKSIZE; \
	      hce -> hce_hdr = hhdr; \
           } \
         } \
       }

Definition at line 113 of file gc_hdrs.h.

#define HC_HIT ( )

Definition at line 85 of file gc_hdrs.h.

#define HC_MISS ( )

Definition at line 86 of file gc_hdrs.h.

#define HCE (   h)    hdr_cache + (((word)(h) >> LOG_HBLKSIZE) & (HDR_CACHE_SIZE-1))

Definition at line 101 of file gc_hdrs.h.

#define HCE_HDR (   h)    ((hce) -> hce_hdr)

Definition at line 106 of file gc_hdrs.h.

#define HCE_VALID_FOR (   hce,
 
)
Value:
((hce) -> block_addr == \
                            ((word)(h) >> LOG_HBLKSIZE))

Definition at line 103 of file gc_hdrs.h.

#define HDR (   p)    HDR_INNER(p)

Definition at line 192 of file gc_hdrs.h.

#define HDR_CACHE_SIZE   8 /* power of 2 */

Definition at line 94 of file gc_hdrs.h.

#define HDR_FROM_BI (   bi,
  p 
)    ((bi)->index[((word)(p) >> LOG_HBLKSIZE) & (BOTTOM_SZ - 1)])

Definition at line 183 of file gc_hdrs.h.

#define HDR_INNER (   p)    HDR_FROM_BI(BI(p),p)

Definition at line 188 of file gc_hdrs.h.

#define INIT_HDR_CACHE   BZERO(hdr_cache, sizeof(hdr_cache));

Definition at line 99 of file gc_hdrs.h.

#define IS_FORWARDING_ADDR_OR_NIL (   hhdr)    ((unsigned long) (hhdr) <= MAX_JUMP)

Definition at line 228 of file gc_hdrs.h.

#define LOG_BOTTOM_SZ   10

Definition at line 47 of file gc_hdrs.h.

Definition at line 50 of file gc_hdrs.h.

#define MAX_JUMP   (HBLKSIZE - 1)

Definition at line 181 of file gc_hdrs.h.

#define SET_HDR (   p,
  hhdr 
)    HDR_INNER(p) = (hhdr)

Definition at line 196 of file gc_hdrs.h.

#define TOP_SZ   (1 << LOG_TOP_SZ)

Definition at line 54 of file gc_hdrs.h.

#define USE_HDR_CACHE

Definition at line 58 of file gc_hdrs.h.


Typedef Documentation

typedef struct hblkhdr

Definition at line 17 of file gc_hdrs.h.


Variable Documentation

Definition at line 130 of file headers.c.