12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- #if defined(HAVE_CONFIG_H)
- #include "config.h"
- #endif
- #include <limits.h>
- #include <stdio.h>
- #include <stdarg.h>
- #include <fcntl.h>
- #include <stdlib.h>
- #include <malloc.h>
- #include <inttypes.h>
- #include <string.h>
- #include <errno.h>
- #include <signal.h>
- #include <sys/time.h>
- #include <time.h>
- #include "spandsp.h"
- int main(int argc, char *argv[])
- {
- void *a;
- void *b;
- void *c;
-
- if (span_mem_allocators(malloc,
- realloc,
- free,
- memalign,
- free))
- {
- printf("Failed\n");
- exit(2);
- }
- a = span_aligned_alloc(8, 42);
- b = span_alloc(42);
- c = span_realloc(NULL, 42);
- printf("%p %p %p\n", a, b, c);
- span_aligned_free(a);
- span_free(b);
- span_free(c);
- }
|