C:/Users/Dennis/src/lang/russell.orig/src/gc/reclaim.c File Reference

#include <stdio.h>
#include "gc_private.h"

Go to the source code of this file.

Defines

#define FOUND_FREE(hblk, word_no)
#define INCR_WORDS(sz)
#define DO_OBJ(start_displ)
#define DO_OBJ(start_displ)
#define DO_OBJ(start_displ)
#define DO_OBJ(start_displ)

Functions

bool GC_block_empty (hdr *hhdr)
ptr_t GC_reclaim_clear (struct hblk *hbp, hdr *hhdr, word sz, ptr_t list, bool abort_if_found)
ptr_t GC_reclaim_clear2 (struct hblk *hbp, hdr *hhdr, ptr_t list, bool abort_if_found)
ptr_t GC_reclaim_clear4 (struct hblk *hbp, hdr *hhdr, ptr_t list, bool abort_if_found)
ptr_t GC_reclaim_uninit (struct hblk *hbp, hdr *hhdr, word sz, ptr_t list, bool abort_if_found)
ptr_t GC_reclaim_uninit2 (struct hblk *hbp, hdr *hhdr, ptr_t list, bool abort_if_found)
ptr_t GC_reclaim_uninit4 (struct hblk *hbp, hdr *hhdr, ptr_t list, bool abort_if_found)
 GC_reclaim_small_nonempty_block (struct hblk *hbp, int abort_if_found)
void GC_reclaim_block (struct hblk *hbp, int abort_if_found)
void GC_start_reclaim (int abort_if_found)
void GC_continue_reclaim (word sz, int kind)

Variables

signed_word GC_mem_found = 0


Define Documentation

#define DO_OBJ ( start_displ   ) 

Value:

if (!(mark_word & (1 << start_displ))) { \
            FOUND_FREE(hbp, p - (word *)hbp + start_displ); \
            p[start_displ] = (word)list; \
            list = (ptr_t)(p+start_displ); \
            INCR_WORDS(4); \
        }

#define DO_OBJ ( start_displ   ) 

Value:

if (!(mark_word & (1 << start_displ))) { \
            FOUND_FREE(hbp, p - (word *)hbp + start_displ); \
            p[start_displ] = (word)list; \
            list = (ptr_t)(p+start_displ); \
            INCR_WORDS(2); \
        }

#define DO_OBJ ( start_displ   ) 

Value:

if (!(mark_word & (1 << start_displ))) { \
            FOUND_FREE(hbp, p - (word *)hbp + start_displ); \
            p[start_displ] = (word)list; \
            list = (ptr_t)(p+start_displ); \
            p[start_displ+1] = 0; \
            p[start_displ+2] = 0; \
            p[start_displ+3] = 0; \
            INCR_WORDS(4); \
        }

#define DO_OBJ ( start_displ   ) 

Value:

if (!(mark_word & (1 << start_displ))) { \
            FOUND_FREE(hbp, p - (word *)hbp + start_displ); \
            p[start_displ] = (word)list; \
            list = (ptr_t)(p+start_displ); \
            p[start_displ+1] = 0; \
            INCR_WORDS(2); \
        }

Referenced by GC_reclaim_clear2(), GC_reclaim_clear4(), GC_reclaim_uninit2(), and GC_reclaim_uninit4().

#define FOUND_FREE ( hblk,
word_no   ) 

Definition at line 42 of file reclaim.c.

Referenced by GC_reclaim_block(), GC_reclaim_clear(), and GC_reclaim_uninit().

#define INCR_WORDS ( sz   ) 

Definition at line 72 of file reclaim.c.

Referenced by GC_reclaim_clear(), and GC_reclaim_uninit().


Function Documentation

bool GC_block_empty ( hdr hhdr  ) 

Definition at line 57 of file reclaim.c.

References FALSE, MARK_BITS_SZ, and TRUE.

Referenced by GC_reclaim_block().

void GC_continue_reclaim ( word  sz,
int  kind 
)

Definition at line 527 of file reclaim.c.

References FALSE, GC_obj_kinds, GC_reclaim_small_nonempty_block(), and HDR.

void GC_reclaim_block ( struct hblk hbp,
int  abort_if_found 
)

Definition at line 423 of file reclaim.c.

References BYTES_TO_WORDS, FALSE, FOUND_FREE, GC_block_empty(), GC_freehblk(), GC_mem_found, GC_obj_kinds, GC_printf0, GC_printf1, GC_reclaim_small_nonempty_block(), HBLKSIZE, HDR, HDR_WORDS, mark_bit_from_hdr, MAXOBJSZ, NORMAL, PTRFREE, and TRUE.

Referenced by GC_start_reclaim().

ptr_t GC_reclaim_clear ( struct hblk hbp,
hdr hhdr,
word  sz,
ptr_t  list,
bool  abort_if_found 
)

Definition at line 80 of file reclaim.c.

References FOUND_FREE, GC_mem_found, HBLKSIZE, HDR_WORDS, INCR_WORDS, mark_bit_from_hdr, obj_link, and WORDS_TO_BYTES.

Referenced by GC_reclaim_small_nonempty_block().

ptr_t GC_reclaim_clear2 ( struct hblk hbp,
hdr hhdr,
ptr_t  list,
bool  abort_if_found 
)

Definition at line 127 of file reclaim.c.

References divWORDSZ, DO_OBJ, GC_mem_found, hblkhdr::hb_marks, HBLKSIZE, and HDR_WORDS.

Referenced by GC_reclaim_small_nonempty_block().

ptr_t GC_reclaim_clear4 ( struct hblk hbp,
hdr hhdr,
ptr_t  list,
bool  abort_if_found 
)

Definition at line 183 of file reclaim.c.

References divWORDSZ, DO_OBJ, GC_mem_found, hblkhdr::hb_marks, HBLKSIZE, and HDR_WORDS.

Referenced by GC_reclaim_small_nonempty_block().

GC_reclaim_small_nonempty_block ( struct hblk hbp,
int  abort_if_found 
)

Definition at line 375 of file reclaim.c.

References GC_obj_kinds, GC_reclaim_clear(), GC_reclaim_clear2(), GC_reclaim_clear4(), GC_reclaim_uninit(), GC_reclaim_uninit2(), GC_reclaim_uninit4(), HDR, obj_kind::ok_freelist, and obj_kind::ok_init.

Referenced by GC_continue_reclaim(), and GC_reclaim_block().

ptr_t GC_reclaim_uninit ( struct hblk hbp,
hdr hhdr,
word  sz,
ptr_t  list,
bool  abort_if_found 
)

Definition at line 231 of file reclaim.c.

References FOUND_FREE, GC_mem_found, HBLKSIZE, HDR_WORDS, INCR_WORDS, mark_bit_from_hdr, obj_link, and WORDS_TO_BYTES.

Referenced by GC_reclaim_small_nonempty_block().

ptr_t GC_reclaim_uninit2 ( struct hblk hbp,
hdr hhdr,
ptr_t  list,
bool  abort_if_found 
)

Definition at line 271 of file reclaim.c.

References divWORDSZ, DO_OBJ, GC_mem_found, hblkhdr::hb_marks, HBLKSIZE, and HDR_WORDS.

Referenced by GC_reclaim_small_nonempty_block().

ptr_t GC_reclaim_uninit4 ( struct hblk hbp,
hdr hhdr,
ptr_t  list,
bool  abort_if_found 
)

Definition at line 326 of file reclaim.c.

References divWORDSZ, DO_OBJ, GC_mem_found, hblkhdr::hb_marks, HBLKSIZE, and HDR_WORDS.

Referenced by GC_reclaim_small_nonempty_block().

void GC_start_reclaim ( int  abort_if_found  ) 

Definition at line 483 of file reclaim.c.

References GC_apply_to_all_blocks(), GC_n_kinds, GC_obj_kinds, GC_printf0, GC_reclaim_block(), MAXOBJSZ, obj_kind::ok_freelist, and obj_kind::ok_reclaim_list.


Variable Documentation

signed_word GC_mem_found = 0

Definition at line 15 of file reclaim.c.

Referenced by GC_gcollect_inner(), GC_reclaim_block(), GC_reclaim_clear(), GC_reclaim_clear2(), GC_reclaim_clear4(), GC_reclaim_uninit(), GC_reclaim_uninit2(), and GC_reclaim_uninit4().


Generated on Fri Jan 25 10:39:49 2008 for russell by  doxygen 1.5.4