Re: malloc realloc and pointers
- From: CBFalconer <cbfalconer@xxxxxxxxx>
- Date: Thu, 29 Nov 2007 23:54:48 -0500
"K. Jennings" wrote:
.... snip ...
3) realloc() returns NULL, in which case ptr is pointing to the
unchanged memory region as before.
What happens when ptr is not one returned by a previous
invocation to malloc(), calloc() or realloc()?
Then you know that realloc moved the storage. It doesn't affect
the data held by the pointed to object.
--
Chuck F (cbfalconer at maineline dot net)
<http://cbfalconer.home.att.net>
Try the download section.
--
Posted via a free Usenet account from http://www.teranews.com
.
- References:
- malloc realloc and pointers
- From: ravi
- Re: malloc realloc and pointers
- From: Kenneth Brody
- Re: malloc realloc and pointers
- From: K. Jennings
- malloc realloc and pointers
- Prev by Date: Re: Reading a table
- Next by Date: Re: pointer as argument and parameter
- Previous by thread: Re: malloc realloc and pointers
- Next by thread: Re: malloc realloc and pointers
- Index(es):
Relevant Pages
|