Back to index

plt-scheme  4.2.1
Classes | Defines | Typedefs | Functions | Variables
gc_pmark.h File Reference
#include "../gc_mark.h"
#include "gc_priv.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  GC_ms_entry

Defines

#define BITMAP_BITS   (WORDSZ - GC_DS_TAG_BITS)
#define PROC(descr)   (GC_mark_procs[((descr) >> GC_DS_TAG_BITS) & (GC_MAX_MARK_PROCS-1)])
#define ENV(descr)   ((descr) >> (GC_DS_TAG_BITS + GC_LOG_MAX_MARK_PROCS))
#define MAX_ENV   (((word)1 << (WORDSZ - GC_DS_TAG_BITS - GC_LOG_MAX_MARK_PROCS)) - 1)
#define GC_MARK_STACK_DISCARDS   (INITIAL_MARK_STACK_SIZE/8)
#define ADD_TO_ATOMIC(sz)   GC_atomic_in_use += (sz)
#define ADD_TO_COMPOSITE(sz)   GC_composite_in_use += (sz)
#define PUSH_OBJ(obj, hhdr, mark_stack_top, mark_stack_limit)
#define PUSH_CONTENTS(current, mark_stack_top, mark_stack_limit, source, exit_label)
#define HC_PUSH_CONTENTS(current, mark_stack_top, mark_stack_limit, source, exit_label)
#define SET_MARK_BIT_EXIT_IF_SET(hhdr, displ, exit_label)
#define PUSH_CONTENTS_HDR(current, mark_stack_top, mark_stack_limit, source, exit_label, hhdr)
#define PUSH_ONE_CHECKED_STACK(p, source)   GC_mark_and_push_stack(p)
#define GC_PUSH_ONE_STACK(p, source)
#define GC_PUSH_ONE_HEAP(p, source)
#define MARK_FROM_MARK_STACK()
#define GC_MARK_FO(real_ptr, mark_proc)
#define MS_NONE   0 /* No marking in progress. I holds. */
#define MS_PUSH_RESCUERS   1 /* Rescuing objects are currently */
#define MS_PUSH_UNCOLLECTABLE   2
#define MS_ROOTS_PUSHED   3 /* I holds, mark stack may be nonempty */
#define MS_PARTIALLY_INVALID   4 /* I may not hold, e.g. because of M.S. */
#define MS_INVALID   5 /* I may not hold. */

Typedefs

typedef struct GC_ms_entry mse
typedef int mark_state_t

Functions

ptr_t GC_find_start ()
mse *GC_signal_mark_stack_overflow GC_PROTO ((mse *msp))
mse *GC_mark_from GC_PROTO ((mse *top, mse *bottom, mse *limit))

Variables

word GC_n_mark_procs
word GC_mark_stack_size
mseGC_mark_stack_limit
mseGC_mark_stack_top
mseGC_mark_stack
GC_bool GC_mark_stack_too_small
mark_state_t GC_mark_state

Class Documentation

struct GC_ms_entry

Definition at line 62 of file gc_pmark.h.

Class Members
GC_word mse_descr
GC_word * mse_start

Define Documentation

#define ADD_TO_ATOMIC (   sz)    GC_atomic_in_use += (sz)

Definition at line 146 of file gc_pmark.h.

#define ADD_TO_COMPOSITE (   sz)    GC_composite_in_use += (sz)

Definition at line 147 of file gc_pmark.h.

#define BITMAP_BITS   (WORDSZ - GC_DS_TAG_BITS)

Definition at line 48 of file gc_pmark.h.

#define ENV (   descr)    ((descr) >> (GC_DS_TAG_BITS + GC_LOG_MAX_MARK_PROCS))

Definition at line 51 of file gc_pmark.h.

#define GC_MARK_FO (   real_ptr,
  mark_proc 
)
Value:
{ \
    (*(mark_proc))(real_ptr); \
    while (!GC_mark_stack_empty()) MARK_FROM_MARK_STACK(); \
    if (GC_mark_state != MS_NONE) { \
        GC_set_mark_bit(real_ptr); \
        while (!GC_mark_some((ptr_t)0)) {} \
    } \
}

Definition at line 336 of file gc_pmark.h.

Definition at line 60 of file gc_pmark.h.

#define GC_PUSH_ONE_HEAP (   p,
  source 
)
Value:
FIXUP_POINTER(p); \
    if ((ptr_t)(p) >= (ptr_t)GC_least_plausible_heap_addr      \
        && (ptr_t)(p) < (ptr_t)GC_greatest_plausible_heap_addr) {     \
           GC_mark_stack_top = GC_mark_and_push( \
                         (GC_PTR)(p), GC_mark_stack_top, \
                         GC_mark_stack_limit, (GC_PTR *)(source)); \
    }

Definition at line 311 of file gc_pmark.h.

#define GC_PUSH_ONE_STACK (   p,
  source 
)
Value:
if ((ptr_t)(p) >= (ptr_t)GC_least_plausible_heap_addr   \
        && (ptr_t)(p) < (ptr_t)GC_greatest_plausible_heap_addr) {     \
        PUSH_ONE_CHECKED_STACK(p, source);       \
      }

Definition at line 299 of file gc_pmark.h.

#define HC_PUSH_CONTENTS (   current,
  mark_stack_top,
  mark_stack_limit,
  source,
  exit_label 
)
Value:
{ \
    hdr * my_hhdr; \
    ptr_t my_current = current; \
 \
    HC_GET_HDR(my_current, my_hhdr, source); \
    PUSH_CONTENTS_HDR(my_current, mark_stack_top, mark_stack_limit, \
                source, exit_label, my_hhdr);    \
exit_label: ; \
}

Definition at line 194 of file gc_pmark.h.

#define MARK_FROM_MARK_STACK ( )
Value:

Definition at line 326 of file gc_pmark.h.

#define MAX_ENV   (((word)1 << (WORDSZ - GC_DS_TAG_BITS - GC_LOG_MAX_MARK_PROCS)) - 1)

Definition at line 53 of file gc_pmark.h.

#define MS_INVALID   5 /* I may not hold. */

Definition at line 388 of file gc_pmark.h.

#define MS_NONE   0 /* No marking in progress. I holds. */

Definition at line 366 of file gc_pmark.h.

#define MS_PARTIALLY_INVALID   4 /* I may not hold, e.g. because of M.S. */

Definition at line 383 of file gc_pmark.h.

#define MS_PUSH_RESCUERS   1 /* Rescuing objects are currently */

Definition at line 369 of file gc_pmark.h.

#define MS_PUSH_UNCOLLECTABLE   2

Definition at line 375 of file gc_pmark.h.

#define MS_ROOTS_PUSHED   3 /* I holds, mark stack may be nonempty */

Definition at line 381 of file gc_pmark.h.

#define PROC (   descr)    (GC_mark_procs[((descr) >> GC_DS_TAG_BITS) & (GC_MAX_MARK_PROCS-1)])

Definition at line 49 of file gc_pmark.h.

#define PUSH_CONTENTS (   current,
  mark_stack_top,
  mark_stack_limit,
  source,
  exit_label 
)
Value:
{ \
    hdr * my_hhdr; \
    ptr_t my_current = current; \
 \
    GET_HDR(my_current, my_hhdr); \
    if (IS_FORWARDING_ADDR_OR_NIL(my_hhdr)) { \
	 hdr * new_hdr = GC_invalid_header; \
         my_current = GC_find_start(my_current, my_hhdr, &new_hdr); \
         my_hhdr = new_hdr; \
    } \
    PUSH_CONTENTS_HDR(my_current, mark_stack_top, mark_stack_limit, \
                source, exit_label, my_hhdr);    \
exit_label: ; \
}

Definition at line 176 of file gc_pmark.h.

#define PUSH_CONTENTS_HDR (   current,
  mark_stack_top,
  mark_stack_limit,
  source,
  exit_label,
  hhdr 
)
Value:
{ \
    int displ;  /* Displacement in block; first bytes, then words */ \
    int map_entry; \
    \
    displ = HBLKDISPL(current); \
    map_entry = MAP_ENTRY((hhdr -> hb_map), displ); \
    displ = BYTES_TO_WORDS(displ); \
    if (map_entry > CPP_MAX_OFFSET) { \
       if (map_entry == OFFSET_TOO_BIG) { \
         map_entry = displ % (hhdr -> hb_sz); \
         displ -= map_entry; \
         if (displ + (hhdr -> hb_sz) > BYTES_TO_WORDS(HBLKSIZE) \
             && displ != 0) { \
           GC_ADD_TO_BLACK_LIST_NORMAL((word)current, source); \
           goto exit_label; \
         } \
       } else { \
          GC_ADD_TO_BLACK_LIST_NORMAL((word)current, source); goto exit_label; \
       } \
    } else { \
        displ -= map_entry; \
    } \
    GC_ASSERT(displ >= 0 && displ < MARK_BITS_PER_HBLK); \
    SET_MARK_BIT_EXIT_IF_SET(hhdr, displ, exit_label); \
    GC_STORE_BACK_PTR((ptr_t)source, (ptr_t)HBLKPTR(current) \
                                  + WORDS_TO_BYTES(displ)); \
    PUSH_OBJ(((word *)(HBLKPTR(current)) + displ), hhdr, \
            mark_stack_top, mark_stack_limit) \
}

Definition at line 238 of file gc_pmark.h.

#define PUSH_OBJ (   obj,
  hhdr,
  mark_stack_top,
  mark_stack_limit 
)
Value:
{ \
    register word _descr = (hhdr) -> hb_descr; \
        \
    if (_descr == 0) { \
       ADD_TO_ATOMIC((hhdr) -> hb_sz); \
    } else { \
        ADD_TO_COMPOSITE((hhdr) -> hb_sz); \
        mark_stack_top++; \
        if (mark_stack_top >= mark_stack_limit) { \
          mark_stack_top = GC_signal_mark_stack_overflow(mark_stack_top); \
        } \
        mark_stack_top -> mse_start = (obj); \
        mark_stack_top -> mse_descr = _descr; \
    } \
}

Definition at line 155 of file gc_pmark.h.

Definition at line 274 of file gc_pmark.h.

#define SET_MARK_BIT_EXIT_IF_SET (   hhdr,
  displ,
  exit_label 
)
Value:
{ \
        register word * mark_word_addr = hhdr -> hb_marks + divWORDSZ(displ); \
          \
        OR_WORD_EXIT_IF_SET(mark_word_addr, (word)1 << modWORDSZ(displ), \
                         exit_label); \
    }

Definition at line 222 of file gc_pmark.h.


Typedef Documentation

typedef int mark_state_t

Definition at line 350 of file gc_pmark.h.


Function Documentation

mse* GC_mark_from GC_PROTO ( (mse *top, mse *bottom, mse *limit)  )

Variable Documentation

Definition at line 105 of file mark.c.

Definition at line 107 of file mark.c.

Definition at line 109 of file mark.c.

Definition at line 121 of file mark.c.

Definition at line 114 of file mark.c.

Definition at line 119 of file mark.c.

Definition at line 45 of file mark.c.