From: Joe Spanicek <joe@resptk.bhp.com.au>
Subject: Question on 'realloc' function
Date: 1997/09/18 [thread overview]
Message-ID: <3420AB59.167E@resptk.bhp.com.au> (raw)
Hi,
I hope there will be someout out there who could help.
I have a question regarding the 'realloc' function on Digital Unix V4.0.
I have read the man page but it is not that clear on a certain points.
If a call to 'realloc' fails and returns a NULL to indicate it has,
what actually happens to the original memory block passed as a pointer
reference into the function ??
1) Does it get free'd ??
2) Or is the original memory block left intact and can
subsequently be used ??
3) Or at some point when it fails, can the memory block
get corrupted and you do not know whether it can be used ??
The reason I ask, is that in a certain application, large emounts of
memory are realloc'd. When this fails I would like to free the
original memory block and let the application continue as normal.
Thanks for any help.
Joe Spanicek
joe@resptk.bhp.com.au
next reply other threads:[~1997-09-18 4:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-09-18 4:00 Joe Spanicek [this message]
1997-10-01 4:00 ` Question on 'realloc' function Al Simons
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox