DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ T m

⟦c6206b653⟧ TextFile

    Length: 522 (0x20a)
    Types: TextFile
    Names: »mem.c«

Derivation

└─⟦a0efdde77⟧ Bits:30001252 EUUGD11 Tape, 1987 Spring Conference Helsinki
    └─ ⟦this⟧ »EUUGD11/euug-87hel/sec8/mcp/src/mem.c« 

TextFile

#include "mem.h"

char	*realloc(), *malloc();

addr
MEM(n)
int n;

{
	flexaddr m;

	critical();
	m.p_cp = malloc( (unsigned) n );
	if (!m.p_cp)
		panic("MEM internal error: out of memory");
	non_critical();
	return m.p_ap;
}

addr
DELTAMEM(p, n)
addr p;
int n;

{
	flexaddr m;

	critical();
	m.p_cp = realloc((char *)p, (unsigned) n);
	if (!m.p_cp)
		panic("DELTAMEM internal error: out of memory");
	non_critical();
	return m.p_ap;
}

FREEMEM(cp)
char *cp;

{
	critical();
	free((char *) cp);
	non_critical();
	return;
}