|
|
1.1 root 1: /* mem.h - freestk, roundew, truncew */
2:
3: /*----------------------------------------------------------------------
1.1.1.2 ! root 4: * roundew, truncew - round or trunctate address to next even word
1.1 root 5: *----------------------------------------------------------------------
6: */
1.1.1.2 ! root 7: #define roundew(x) (WORD *)( (3 + (WORD)(x)) & ~03 )
! 8: #define truncew(x) (WORD *)( ((WORD)(x)) & ~03 )
1.1 root 9:
10: /*----------------------------------------------------------------------
11: * freestk -- free stack memory allocated by getstk
12: *----------------------------------------------------------------------
13: */
14: #define freestk(p,len) freemem((unsigned)(p) \
15: - (unsigned)(roundew(len)) \
16: + (unsigned)sizeof(int), \
17: roundew(len) )
18:
1.1.1.2 ! root 19: struct mblock {
! 20: struct mblock *mnext;
! 21: unsigned int mlen;
! 22: };
1.1 root 23: extern struct mblock memlist; /* head of free memory list */
1.1.1.2 ! root 24: extern WORD *maxaddr; /* max memory address */
! 25: extern WORD end; /* address beyond loaded memory */
! 26:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.