ftmemsim-valgrind/memcheck/tests/malloc_usable.c
Julian Seward a48daec904 Merge r6109:
Various minor changes to make these compile on AIX5.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6254
2006-10-17 01:26:12 +00:00

15 lines
283 B
C

#include <assert.h>
#include <malloc.h>
#include <stdlib.h>
#include <stdio.h>
int main(void)
{
// Since our allocations are in multiples of 8, 99 will round up to 104.
int* x = malloc(99);
# if !defined(_AIX)
assert(104 == malloc_usable_size(x));
# endif
return 0;
}