ftmemsim-valgrind/memcheck/tests/malloc_usable.c
Julian Seward ad7de5b336 Delete the AIX5 port. The last release this worked for is 3.4.1,
and then only on AIX 5.2 and 5.3.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11842
2011-06-28 07:25:29 +00:00

21 lines
507 B
C

#include <assert.h>
#include "tests/malloc.h"
#include <stdlib.h>
#include <stdio.h>
int main(void)
{
# if !defined(VGO_darwin)
// Because Memcheck marks any slop as inaccessible, it doesn't round up
// sizes for malloc_usable_size().
int* x = malloc(99);
// XXX: would be better to have a HAVE_MALLOC_USABLE_SIZE variable here
assert(99 == malloc_usable_size(x));
assert( 0 == malloc_usable_size(NULL));
assert( 0 == malloc_usable_size((void*)0xdeadbeef));
# endif
return 0;
}