What happens when realloc() returns NULL?

Tom May tom at yang.cpac.washington.edu
Thu Aug 31 16:14:15 AEST 1989


If I do this:

	char *p1, *p2;
	p1 = malloc (100);
	p2 = realloc (p1, 200);

and malloc() returns non-NULL, but realloc() returns NULL, is the memory
pointed to by p1 still allocated?


--
Tom May
tom at yin.cpac.washington.edu



More information about the Comp.lang.c mailing list