17#if !defined(OPENNURBS_MEMORY_INC_)
18#define OPENNURBS_MEMORY_INC_
20#if defined (cplusplus) || defined(_cplusplus) || defined(__cplusplus)
25size_t ON_MemoryPageSize();
27#define ON_MEMORY_POOL void
30ON_MEMORY_POOL* ON_MainMemoryPool(
void);
33ON_MEMORY_POOL* ON_WorkerMemoryPool(
void);
36void* onmalloc(
size_t );
39void* onmalloc_from_pool( ON_MEMORY_POOL*,
size_t );
42void* oncalloc(
size_t,
size_t );
45void* oncalloc_from_pool( ON_MEMORY_POOL*,
size_t,
size_t );
51void* onrealloc(
void*,
size_t );
54void* onrealloc_from_pool( ON_MEMORY_POOL*,
void*,
size_t );
57size_t onmsize(
const void* );
60void* onmemdup(
const void*,
size_t );
63char* onstrdup(
const char* );
65#if defined(_WCHAR_T_DEFINED)
67wchar_t* onwcsdup(
const wchar_t* );
71unsigned char* onmbsdup(
const unsigned char* );
74size_t onmemoryusecount(
76 size_t* realloc_count,
82size_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)