mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
Update.
* malloc/memusage.c (realloc): Don't count already allocated memory in the sums. (me): Always use dlsym() to find the real implementations.
This commit is contained in:
@ -357,10 +357,13 @@ realloc (void *old, size_t len)
|
||||
|
||||
/* Keep track of number of calls. */
|
||||
++calls[idx_realloc];
|
||||
/* Keep track of total memory consumption for `realloc'. */
|
||||
total[idx_realloc] += len;
|
||||
/* Keep track of total memory requirement. */
|
||||
grand_total += len;
|
||||
if (len > old_len)
|
||||
{
|
||||
/* Keep track of total memory consumption for `realloc'. */
|
||||
total[idx_realloc] += len - old_len;
|
||||
/* Keep track of total memory requirement. */
|
||||
grand_total += len - old_len;
|
||||
}
|
||||
/* Remember the size of the request. */
|
||||
if (len < 65536)
|
||||
++histogram[len / 16];
|
||||
|
Reference in New Issue
Block a user