mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-03 10:05:29 +00:00
I tried using 'svn merge' to do the merge but it did a terrible job and there were bazillions of conflicts. So instead I just took the diff between the branch and trunk at r10155, applied the diff to the trunk, 'svn add'ed the added files (no files needed to be 'svn remove'd) and committed. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10156
21 lines
529 B
C
21 lines
529 B
C
#include <assert.h>
|
|
#include "tests/malloc.h"
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
|
|
int main(void)
|
|
{
|
|
# if !defined(VGO_aix5) && !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;
|
|
}
|