Re: Realloc is blocking execution
On Wed, 14 Oct 2009, Goswin von Brederlow wrote:
Mats Erik Andersson <firstname.lastname@example.org> writes:
Is this unavoidable fact that realloc() blocks execution
a known issue with gcc-4.3.2 or glibc-2.7?
Personally, I was under the impression that
malloc/realloc never should block execution,
but would instead return NULL. That Etch and
Lenny behave oppositely disturbs me very much.
What do you mean by "block execution"?
If you mean it takes a while to return then I guess that just means
you now have a case where memory is copied while before there was free
space after the allocation.
I suppose even massive memory copying and/or swap activity would hardly
delay the gcc process so much that it would be distinguishable from
"normal" gcc behavior. Perhaps Mats means "the gcc process hangs
indefinitely in realloc()"?
Mats, how do you know it's realloc()? Can you try "strace gcc"?