File:  [MW Coherent from dump] / coherent / d / usr / lib / libmp / mpalloc.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Wed May 29 04:56:38 2019 UTC (7 years, 2 months ago) by root
Branches: MarkWilliams, MAIN
CVS tags: relic, HEAD
coherent

#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);
}

unix.superglobalmegacorp.com

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