18 typedef void(*MemoryCleanupFunction)();
24 BASE_EXPORT MemoryCleanupFunction addCleanupFunction(MemoryCleanupFunction func);
25 BASE_EXPORT void * imalloc(
size_t s,
const char *file,
unsigned len);
33#ifdef __INTEL_COMPILER
34#pragma warning(disable:3663)
35inline void *
operator new(
size_t s) {
return itasca::memory::imalloc(s); }
36inline void *
operator new[](
size_t s) {
return itasca::memory::imalloc(s); }
37inline void operator delete(
void *v) { itasca::memory::ifree(v); }
38inline void operator delete[](
void *v) { itasca::memory::ifree(v); }
40# ifndef __PLACEMENT_NEW_INLINE
41void *
operator new(size_t,
void *v) {
return(v); }
42void operator delete(
void *,
void *) { }
43# define __PLACEMENT_NEW_INLINE
45# ifndef __PLACEMENT_VEC_NEW_INLINE
46void *
operator new[](size_t,
void *v) {
return(v); }
47void operator delete[](
void *,
void *) {}
48# define __PLACEMENT_VEC_NEW_INLINE
55# define NEW(x) new(x,__FILE__,__LINE__)
56# define NEWC(x) new(#x,__FILE__,__LINE__) x
57inline void *
operator new(
size_t s,
const char *,
const char *file,
unsigned line)
59 return itasca::memory::imalloc(s, file, line);
61inline void *
operator new[](
size_t s,
const char *,
const char *file,
unsigned line)
63 return itasca::memory::imalloc(s, file, line);
65inline void operator delete(
void *v,
const char *,
const char *, unsigned) { itasca::memory::ifree(v); }
66inline void operator delete[](
void *v,
const char *,
const char *, unsigned) { itasca::memory::ifree(v); }
112inline void *
operator new(
size_t s,
const char*,
const char*, unsigned) {
return operator new(s); }
113inline void *
operator new[](
size_t s,
const char*,
const char*, unsigned ) {
return operator new(s); }
114inline void operator delete(
void* v,
const char*,
const char*, unsigned) { return ::operator
delete(v); }
115inline void operator delete[](
void* v,
const char*,
const char*, unsigned) { return ::operator
delete(v); }
117# define NEWC(x) new x
123# define NEWC(x) new x
Base type definitions for the engine.
#define BASE_EXPORT
Definition basedef.h:24
namespace Itasca
Definition basememory.cpp:10