|
From: Robert W. <rj...@du...> - 2004-01-15 08:57:15
|
> However, the same sort of malloc() followed by a free() was > done a number of times earlier. If vg holds on to freed > memory then there may be a problem. The machine is 1GB memory > and 2GB swap and abour 450MB of swap was used at the time > of failure. Valgrind does hold on to memory for a certain length of time after it's been freed. This is to catch things like this: x =3D malloc(10); free(x); y =3D malloc(10); *x =3D 0; If the second malloc happed to return the same value as the first, the invalid write to *x would never be caught. However, it doesn't keep these forever, and I had assumed it would use that pool when it ran out of memory. Hmm. Too tired to look at the code now, but it's in there somewhere. Search for freed_list. Regards, Robert. --=20 Robert Walsh Amalgamated Durables, Inc. - "We don't make the things you buy." Email: rj...@du... |