Path: utzoo!utgpu!watmath!att!tut.cis.ohio-state.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!ucla-cs!signup
From: signup@valhalla.cs.ucla.edu
Newsgroups: comp.std.c
Subject: Shrinking with realloc
Message-ID: <26328@shemp.CS.UCLA.EDU>
Date: 10 Aug 89 01:58:16 GMT
Sender: news@CS.UCLA.EDU
Reply-To: signup@CS.UCLA.EDU
Organization: UCLA Computer Science
Lines: 9

If realloc is used to shrink a chunk of allocated storage, is it guaranteed
by the standard that the storage won't be moved?  I couldn't find any positive
or negative statement about the matter.

I.e., after
	char *p, *q;
	q = p = (char *) malloc(10);
	(void) realloc(p,5);
is it valid to dereference q?