1 #ifndef _MALLOC_DEFS_H
2 #define _MALLOC_DEFS_H
3 
4 #include "oshmem/runtime/runtime.h"
5 
6 /* See malloc.c for detailed parameter description */
7 #define USE_SPIN_LOCKS  0
8 #define USE_DL_PREFIX
9 #define ABORT   oshmem_shmem_abort(-2)
10 //#define ABORT   abort()
11 #define MORECORE   mca_memheap_ptmalloc_sbrk
12 #define MORECORE_CANNOT_TRIM
13 #define DL_HAVE_MMAP   0
14 #define DL_HAVE_MREMAP 0
15 #define malloc_getpagesize mca_memheap_ptmalloc_getpagesize()
16 #define REALLOC_ZERO_BYTES_FREES
17 #define ABORT_ON_ASSERT_FAILURE 1
18 /* next two are useful for debugging */
19 #define DL_DEBUG 0
20 #define FOOTERS 0
21 /* print error if *alloc() is called with incorrect params */
22 #define USAGE_ERROR_ACTION(m, p) do { printf("PTMALLOC: USAGE ERROR DETECTED: m=%p ptr=%p\n", (void*)m, (void*)p); } while (0)
23 
24 int mca_memheap_ptmalloc_getpagesize(void);
25 void *mca_memheap_ptmalloc_sbrk(size_t size);
26 
27 void* dlmalloc(size_t);
28 void dlfree(void*);
29 void* dlrealloc(void*, size_t);
30 void* dlmemalign(size_t, size_t);
31 
32 #endif
33