home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
vol_200
/
223_01
/
avail.c
< prev
next >
Wrap
Text File
|
1979-12-31
|
640b
|
20 lines
#define NOCCARGC /* no argument count passing */
/*
** Return the number of bytes of available memory.
** In case of a stack overflow condition, if 'abort'
** is non-zero the program aborts with an 'S' clue,
** otherwise zero is returned.
*/
external char *zzmem
avail(aburt) int aburt; {
char x;
if(&x < zzmem) {
if(aburt) abort('M');
return (0);
}
return (&x - zzmem);
}