* Problems with realloc on DECstation
@ 1994-09-02 17:17 Georg Thallinger (IIS)
0 siblings, 0 replies; only message in thread
From: Georg Thallinger (IIS) @ 1994-09-02 17:17 UTC (permalink / raw)
I am using realloc to dynamically augment an array.
According to my interpretation of the man page realloc should copy the data
if the block of memory has to be moved.
I used the debugger to keep track of the values:
(gdb) p *Mesh->lcv@20
$3 = {3, 5, 239, 459, 4, 240, 461, 238, 5, 7, 241, 239, 6, 242, 462, 240, 7,
9, 243, 241}
tmp = realloc(...);
(gdb) p *(int*)tmp@20
$4 = { <repeats 20 times>0}
So the data are obviousely not copied. Whats wrong [-( ? Is my interpretation
of the man page wrong, or is the malloc library incorrect.
I tried to link the malloc library explicitely but it didn't help either.
Thanks for any help
Georg
_--_ _--_
( )~~~( )
\ /
( ' _ ` ) Georg THALLINGER
\ / Institute for Information Systems
.__( `-' ) ___ JOANNEUM RESEARCH
/ /`---'`-' \ Graz / AUSTRIA / Europe
/ / ._/ __
/' /.-----\___/ / )
\___// `----' ! e-mail: thallinger@pbox.joanneum.ac.at
\ ______/ thallinger@joanneum.ada.at
`--_____----' phone: (++43/316) 876 240
\ / fax: (++43/316) 876 191
! !
/ /__
(______)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1994-09-02 17:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-09-02 17:17 Problems with realloc on DECstation Georg Thallinger (IIS)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox