Re: malloc realloc and pointers
- From: Keith Thompson <kst-u@xxxxxxx>
- Date: Thu, 29 Nov 2007 22:48:55 -0800
"K. Jennings" <kjennings@xxxxxxxxxxxxxx> writes:
[...]
[snip]ravi wrote:
2. With realloc(), if some pointer 'ptr' is pointing initially to a
perticular position in a buffer (char *buffer) then on performing a
realloc() on this buffer, what will be 'ptr' pointing to?
What happens when ptr is not one returned by a previous
invocation to malloc(), calloc() or realloc()?
Undefined behavior.
(This is partly a test of news-server.san.rr.com.)
--
Keith Thompson (The_Other_Keith) kst-u@xxxxxxx <http://www.ghoti.net/~kst>
Looking for software development work in the San Diego area.
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
.
- 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: make & nmake, cl & gcc
- Next by Date: Re: Memory address and Pointer
- Previous by thread: Re: malloc realloc and pointers
- Next by thread: Re: malloc realloc and pointers
- Index(es):
Relevant Pages
|