diff options
author | Mattias Andrée <maandree@kth.se> | 2018-08-28 12:36:31 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2018-08-28 12:36:31 +0200 |
commit | 6fda2a0697d9d49db823e1569edf27378cf31daf (patch) | |
tree | 9c088ca8932b98a33bfe92c2300d2940b5ca8353 /test.h | |
parent | Add test function to all .c files (diff) | |
download | libsimple-6fda2a0697d9d49db823e1569edf27378cf31daf.tar.gz libsimple-6fda2a0697d9d49db823e1569edf27378cf31daf.tar.bz2 libsimple-6fda2a0697d9d49db823e1569edf27378cf31daf.tar.xz |
Add tests for allocation functions
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | test.h | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -8,3 +8,23 @@ fprintf(stderr, "Failed at %s:%i: %s\n", __FILE__, __LINE__, #EXPR);\ exit(1);\ } while (0) + + +struct allocinfo { + void *real_beginning; + size_t real_size; + size_t size; + size_t extent; + size_t alignment; + size_t zeroed; + size_t refcount; +}; + + +extern size_t alloc_fail_in; + + +size_t get_pagesize(void); +size_t round_up(size_t); +int have_custom_malloc(void); /* return 0 if run under valgrind(1) */ +struct allocinfo *get_allocinfo(void *); |