mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-15 15:14:21 +00:00
sizes up to a multiple of 8 (or whatever --alignment is). This is combined with the "admin" bytes, resulting in the "extra" bytes. Added VG_(malloc_usable_size) to the tool interface to support this. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7133
14 lines
312 B
C
14 lines
312 B
C
#include <stdlib.h>
|
|
|
|
int main(void)
|
|
{
|
|
int i;
|
|
for (i = 0; i < 20; i++) {
|
|
int* p;
|
|
p = malloc(800); // With --peak-inaccuracy=1000, the first 10 of
|
|
p = malloc(8); // 'free' calls result in peaks, but after that,
|
|
free(p); // only every second one does.
|
|
}
|
|
return 0;
|
|
}
|