|
DataMuseum.dkPresents historical artifacts from the history of: Commodore CBM-900 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Commodore CBM-900 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 644 (0x284) Types: TextFile Notes: UNIX file Names: »mpalloc.c«
└─⟦f27320a65⟧ Bits:30001972 Commodore 900 hard disk image with partial source code └─⟦f4b8d8c84⟧ UNIX Filesystem └─⟦this⟧ »libmp/mpalloc.c«
#include "mprec.h" char *malloc(); #ifndef NULL #define NULL ((char *)0) #endif /* * Mpalc allocates space for either a multi-precision value or * a mint. It does not return unless the space is available. * "Size" is the number of bytes that the value requires. */ char * mpalc(size) unsigned size; { register char *result; result = (char *) malloc(size); if (result == NULL) mperr("No space for value"); return (result); } /* * Mpfree is used to free any space allocated by malloc. * Note that if "blkp" is NULL, then nothing should be done. */ void mpfree(blkp) register char *blkp; { if (blkp != NULL) free(blkp); }