File: malloc_defs.h

package info (click to toggle)
openmpi 5.0.8-3
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 201,692 kB
  • sloc: ansic: 613,078; makefile: 42,353; sh: 11,194; javascript: 9,244; f90: 7,052; java: 6,404; perl: 5,179; python: 1,859; lex: 740; fortran: 61; cpp: 20; tcl: 12
file content (32 lines) | stat: -rw-r--r-- 980 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef _MALLOC_DEFS_H
#define _MALLOC_DEFS_H

#include "oshmem/runtime/runtime.h"

/* See malloc.c for detailed parameter description */
#define USE_SPIN_LOCKS  0
#define USE_DL_PREFIX
#define ABORT   oshmem_shmem_abort(-2)
//#define ABORT   abort()
#define MORECORE   mca_memheap_ptmalloc_sbrk
#define MORECORE_CANNOT_TRIM
#define DL_HAVE_MMAP   0
#define DL_HAVE_MREMAP 0
#define malloc_getpagesize mca_memheap_ptmalloc_getpagesize()
#define REALLOC_ZERO_BYTES_FREES
#define ABORT_ON_ASSERT_FAILURE 1
/* next two are useful for debugging */
#define DL_DEBUG 0
#define FOOTERS 0
/* print error if *alloc() is called with incorrect params */
#define USAGE_ERROR_ACTION(m, p) do { printf("PTMALLOC: USAGE ERROR DETECTED: m=%p ptr=%p\n", (void*)m, (void*)p); } while (0)

int mca_memheap_ptmalloc_getpagesize(void);
void *mca_memheap_ptmalloc_sbrk(size_t size);

void* dlmalloc(size_t);
void dlfree(void*);
void* dlrealloc(void*, size_t);
void* dlmemalign(size_t, size_t);

#endif