17 #if !defined(OPENNURBS_MEMORY_INC_)
18 #define OPENNURBS_MEMORY_INC_
20 #if defined (cplusplus) || defined(_cplusplus) || defined(__cplusplus)
25 size_t ON_MemoryPageSize();
27 #define ON_MEMORY_POOL void
30 ON_MEMORY_POOL* ON_MainMemoryPool(
void);
33 ON_MEMORY_POOL* ON_WorkerMemoryPool(
void);
36 void* onmalloc(
size_t );
39 void* onmalloc_from_pool( ON_MEMORY_POOL*,
size_t );
42 void* oncalloc(
size_t,
size_t );
45 void* oncalloc_from_pool( ON_MEMORY_POOL*,
size_t,
size_t );
51 void* onrealloc(
void*,
size_t );
54 void* onrealloc_from_pool( ON_MEMORY_POOL*,
void*,
size_t );
57 size_t onmsize(
const void* );
60 void* onmemdup(
const void*,
size_t );
63 char* onstrdup(
const char* );
65 #if defined(_WCHAR_T_DEFINED)
67 wchar_t* onwcsdup(
const wchar_t* );
71 unsigned char* onmbsdup(
const unsigned char* );
74 size_t onmemoryusecount(
76 size_t* realloc_count,
82 size_t onmemoryusecountex(
84 size_t* realloc_count,
87 size_t* malloc_zero_count,
88 size_t* free_null_count
93 #define ontcsdup onwcsdup
95 #define ontcsdup onmbsdup
97 #define ontcsdup onstrdup
100 #if defined (cplusplus) || defined(_cplusplus) || defined(__cplusplus)