[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Realloc is blocking execution



> Dear Mentors,

Hi,
 
> in my efforts to reintroduce the package windowlab-1.37,
> I am facing the unexpected fact that realloc() is
> repeatedly blocking execution, when I compile the
> package on a Debian Lenny system. This blocking
> does not happen in Debian Etch, nor in OpenBSD,
> nor FreeBSD.

Hm, I guess that the library functions are just fine and it has something to do 
with the kernel performing memory overcommitment by default. You can prevent 
that by (from the tail of realloc(3) man page): 

echo 2 > /proc/sys/vm/overcommit_memory

and see if that makes any difference. 
Rf. see overcommit_memory in $linux_source/Documentation/sysctl/vm.txt
 
> After getting the upstream author to accept my
> patches for the old package windowlab-1.34, it
> is only this issue with realloc() that prevents
> me from submitting the package to mentors.debian.net.
> 
> 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.

It was not the default behavior back then, so that might be the reason behind 
that difference.

-- 
pub 4096R/0E4BD0AB <people.fccf.net/danchev/key pgp.mit.edu>


Reply to: