1 /* yForth? - Written by Luca Padovani (C) 1996/97
2 * ------------------------------------------------------------------------
3 * This software is FreeWare as long as it comes with this header in each
4 * source file, anyway you can use it or any part of it whatever
5 * you want. It comes without any warranty, so use it at your own risk.
6 * ------------------------------------------------------------------------
7 * Module name: memall.c
8 * Abstract: Memory allocation word set
17 /**************************************************************************/
18 /* WORDS ******************************************************************/
19 /**************************************************************************/
22 register void *addr = malloc(*sp);
23 if (addr == NULL) *sp = 0;
24 else *sp = (Cell) addr;
25 *--sp = FFLAG(addr == NULL);
34 register void *addr = realloc((void *) sp[1], sp[0]);
35 if (addr == NULL) sp[1] = 0;
36 else sp[1] = (Cell) addr;
37 *sp = FFLAG(addr == NULL);