Bus error DURING call to malloc()

Mike Thompson yohn at tumult.asd.sgi.com
Thu Jun 14 05:42:20 AEST 1990


In article <75367 at aerospace.AERO.ORG>, swed at aerospace.aero.org (Gregory D. Swedberg) writes:
> 
> 
> 	Are you ever calling realloc?  The IRIS does not seem to
> implement it correctly, when reallocing to the a larger size it seems
> to just return the original pointer rather than a pointer to a new
> larger block.  I have had to give up on realloc on the IRIS.

Are you implying that realloc isn't returning a large enough buffer for
your (new) request?  The whole purpose of realloc is to avoid copying
data around whenever possible.  To that end, realloc will check to see
if it can grow the current buffer to satisfy the request and just pass
back the same (grown) buffer.  If there isn't enough room to grow the
current buffer, a new buffer will be allocated, the data copied, and
the old buffer released.

If you think that realloc is returning the same buffer and it hasn't
grown the buffer adequately, please call the customer support hot line
immediately with details.

Mike Thompson



More information about the Comp.sys.sgi mailing list