Annotation of 43BSD/contrib/icon/h/gc.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Definitions and declarations used for storage management.
                      3:  */
                      4: 
                      5: #define MARK           0100000         /* high-order bit for gc marking */
                      6: #define SQLINC             128         /* increment for s. q. list space */
                      7: 
                      8: /*
                      9:  * External definitions.
                     10:  */
                     11: 
                     12: extern unsigned heapneed;              /* stated need for heap space */
                     13: extern unsigned strneed;               /* stated need for string space */
                     14: extern int *boundary;                  /* Icon/C stack boundary address */
                     15: extern struct descrip *globals;                /* start of global variables */
                     16: extern struct descrip *eglobals;       /* end of global variables */
                     17: extern struct descrip *gnames;         /* start of global variable names */
                     18: extern struct descrip *egnames;                /* end of global variable names */
                     19: extern struct descrip *statics;                /* start of static variables */
                     20: extern struct descrip *estatics;       /* end of static variables */
                     21: extern struct descrip tended[];                /* tended descriptors, used by lib routines */
                     22: extern struct descrip etended[];       /* end of tended descriptors */
                     23: extern struct descrip **sqlist;                /* beginning of string qualifier list */
                     24: extern struct descrip **sqfree;                /* string qualifier list free pointer */
                     25: extern struct descrip **esqlist;       /* end of string qualifier list */
                     26: 
                     27: /*
                     28:  * Test if *x is a pointer.
                     29:  */
                     30: #define isptr(x)     ((!QUAL(*x)) && (VAR(*x) || POINTER(*x))) 
                     31: /*
                     32:  * Get type of block pointed at by x.
                     33:  */
                     34: #define blktype(x)   (*(int *)x) 
                     35: /*
                     36:  * getsize(x) takes the block pointed to by x and if the size of
                     37:  *  the block as indicated by bsizes[] is non-zero it returns the
                     38:  *  indicated size, otherwise it returns the second word in the
                     39:  *  block which should be the size.
                     40:  */
                     41: #define getsize(x) (bsizes[*(int *)x & ~MARK] ? \
                     42:                     bsizes[*(int *)x & ~MARK] : *((int *)x + 1))

unix.superglobalmegacorp.com

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