Flash said:
CBFalconer wrote, On 26/12/07 21:11:
Nope. On mine the black magic has been grilled under a low heat.
Don't you find that that allows the basic greasy black material to
leak out, so that heavily realloced buffers tend to fail to free
abandoned buffers, resulting in memory leaks?
Code such as the following can be used to detect this sort of
'black leak':
size_t ct
char *p, *t;
for (p = NULL, ct = 0; ++ct
{
if (t = realloc(p, ct)) p = t;
else break;
}
if (t == p) /* no realloc failure occured */
analyzemem(p); /* system dependant code */
}
else failanalyze(p); /* also system dependant */