File:  [CSRG BSD Unix] / 43BSD / ingres / source / gutil / xfree.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:55 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43
BSD 4.3

# include	<sccs.h>

SCCSID(@(#)xfree.c	8.1	12/31/84)

/*
**  XFREE -- free memory only if dynamically allocated.
**
**	This acts just like "free", except that it does nothing
**	if the area handed to it hasn't been dynamically allocated.
**
**	Parameters:
**		p -- a pointer to the area to free.
**
**	Returns:
**		none.
**
**	Side Effects:
**		Free memory queue is changed.
**
**	WARNING:
**		This routine depends on the implementation of malloc
**		in C; it may have to be changed on other systems.
*/

xfree(p)
char	*p;
{
	extern char	end[];

	if (p >= end && p < (char *) &p)
		free(p);
}

unix.superglobalmegacorp.com

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