SST/macro
malloc.h
Go to the documentation of this file.
1 #ifndef sprockit_common_MALLOC_H
2 #define sprockit_common_MALLOC_H
3 
4 #include <stdlib.h>
5 
6 #define SPROCKIT_FAKE_PTR ((void*)0x123)
7 
8 #ifdef SSTMAC
9 
10 #ifdef __cplusplus
11 #define large_new(type,size) ((type*)SPROCKIT_FAKE_PTR)
12 #endif
13 #define large_malloc(size) SPROCKIT_FAKE_PTR
14 
15 #else
16 
17 #ifdef __cplusplus
18 #define large_new(type,size) new type[size];
19 #define large_malloc(size) ::malloc(size)
20 #else
21 #define large_malloc(size) malloc(size)
22 #endif
23 
24 #endif
25 
26 
27 #endif // MALLOC_H
28