140865Sbostic /*- 2*62092Sbostic * Copyright (c) 1979, 1993 3*62092Sbostic * The Regents of the University of California. All rights reserved. 440865Sbostic * 540865Sbostic * %sccs.include.redist.c% 640865Sbostic */ 71667Smckusick 840865Sbostic #ifndef lint 9*62092Sbostic static char sccsid[] = "@(#)NEW.c 8.1 (Berkeley) 06/06/93"; 1040865Sbostic #endif /* not lint */ 111667Smckusick 121667Smckusick #include "h00vars.h" 131667Smckusick NEW(var,size)141667SmckusickNEW(var, size) 151667Smckusick char **var; /* pointer to item being deallocated */ 163014Smckusic long size; /* sizeof struct pointed to by var */ 171667Smckusick { 181667Smckusick extern char *malloc(); 191667Smckusick char *memblk; 201667Smckusick 213014Smckusic memblk = malloc((int)size); 221667Smckusick if (memblk == 0) { 233867Smckusic ERROR("Ran out of memory\n", 0); 241667Smckusick return; 251667Smckusick } 261667Smckusick *var = memblk; 271667Smckusick if (memblk < _minptr) 281667Smckusick _minptr = memblk; 291667Smckusick if (memblk + size > _maxptr) 301667Smckusick _maxptr = memblk + size; 311667Smckusick } 32