Zmenseni objektu pomoci realloc (a Electric Fence)

Jan Kasprzak kas na informatics.muni.cz
Pondělí Leden 31 14:47:41 CET 2000


	Zdravim,

	pri ladeni programu pomoci Electric Fence jsem narazil na problem:
Pokud zavolam realloc() a pozaduji velikost objektu zmensit (nikoli zvetsit),
muze mi realloc() vratit jiny pointer, nebo musi zachovat ten puvodni? Vypada
to, ze alokato v Efence nezachovava puvodni umisteni ani pri zmenseni objektu.
Je to legalni?

Single Unix Spec pise:
: If the new size of the memory object would require movement of the object,
: the space for the previous instantiation of the object is freed.

coz nic vlastne nerika :-(

	Jak to tedy je?

-Yenya

-- 
\ Jan "Yenya" Kasprzak <kas at fi.muni.cz>       http://www.fi.muni.cz/~kas/
\\ PGP: finger kas at aisa.fi.muni.cz   0D99A7FB206605D7 8B35FCDE05B18A5E //
\\\             Czech Linux Homepage:  http://www.linux.cz/              ///
 Its purely bandwidth.  If it was 40 instances of Miguel reading web pages
flat out over 100baseT you would definitely be right. But its not...  (Alan)


Další informace o konferenci Linux