Annotation of researchv10dc/cmd/icon/src/iconx/gc.h, revision 1.1

1.1     ! root        1: /*
        !             2:  * Definitions and declarations used for storage management.
        !             3:  */
        !             4: 
        !             5: #define F_Mark         0100000         /* high-order bit for gc marking */
        !             6: #define Sqlinc             128         /* increment for qualifier pointer space */
        !             7: 
        !             8: /*
        !             9:  * External definitions.
        !            10:  */
        !            11: 
        !            12: extern char *currend;                  /* current end of memory region */
        !            13: extern uword blkneed;                  /* stated need for block space */
        !            14: extern uword strneed;                  /* stated need for string space */
        !            15: extern uword statneed;
        !            16: extern struct descrip *globals;        /* start of global variables */
        !            17: extern struct descrip *eglobals;       /* end of global variables */
        !            18: extern struct descrip *gnames;         /* start of global variable names */
        !            19: extern struct descrip *egnames;        /* end of global variable names */
        !            20: extern struct descrip *statics;        /* start of static variables */
        !            21: extern struct descrip *estatics;       /* end of static variables */
        !            22: extern struct descrip tended[];        /* tended descriptors, used by doasgn */
        !            23: extern struct descrip etended[];       /* end of tended descriptors */
        !            24: extern struct descrip **quallist;      /* beginning of qualifier list */
        !            25: extern struct descrip **qualfree;      /* qualifier list free pointer */
        !            26: extern struct descrip **equallist;     /* end of qualifier list */
        !            27: 
        !            28: /*
        !            29:  * Get type of block pointed at by x.
        !            30:  */
        !            31: #define BlkType(x)   (*(word *)x)
        !            32: 
        !            33: /*
        !            34:  * BlkSize(x) takes the block pointed to by x and if the size of
        !            35:  *  the block as indicated by bsizes[] is non-zero it returns the
        !            36:  *  indicated size, otherwise it returns the second word in the
        !            37:  *  block which should be the size.
        !            38:  */
        !            39: #define BlkSize(x) (bsizes[*(word *)x & ~F_Mark] ? \
        !            40:                     bsizes[*(word *)x & ~F_Mark] : *((word *)x + 1))
        !            41: 
        !            42: /*
        !            43:  * If memory monitoring is not enabled, redefine function calls
        !            44:  * to do nothing.
        !            45:  */
        !            46: #ifndef MemMon
        !            47: #define MMAlc(n)
        !            48: #define MMBGC()
        !            49: #define MMEGC()
        !            50: #define MMInit()
        !            51: #define MMMark(b,t)
        !            52: #define MMStr(n)
        !            53: #define MMSMark(a,n)
        !            54: #define MMType(t)
        !            55: #endif MemMon

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.