diff options
author | Thomas Grill <xovo@users.sourceforge.net> | 2004-01-29 03:32:03 +0000 |
---|---|---|
committer | Thomas Grill <xovo@users.sourceforge.net> | 2004-01-29 03:32:03 +0000 |
commit | 42e84f3e5fd12bc8f1dc23d90600d40cba7f39af (patch) | |
tree | 3896168f923d66a1edb0224bc3aed0d61dc0d8d0 /externals/grill/flext/source/flsupport.cpp | |
parent | 851555a3e26e6e37908696f45223896dc86e6d1c (diff) |
""
svn path=/trunk/; revision=1299
Diffstat (limited to 'externals/grill/flext/source/flsupport.cpp')
-rw-r--r-- | externals/grill/flext/source/flsupport.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/externals/grill/flext/source/flsupport.cpp b/externals/grill/flext/source/flsupport.cpp index d8bddd42..bcbd5b06 100644 --- a/externals/grill/flext/source/flsupport.cpp +++ b/externals/grill/flext/source/flsupport.cpp @@ -136,11 +136,14 @@ void *flext_root::operator new(size_t bytes) bytes += sizeof(size_t); char *blk; +#ifdef FLEXT_NOGLOBALNEW if(bytes >= LARGEALLOC) { // use C library function for large memory blocks blk = (char *)::operator new(bytes); } - else { + else +#endif + { //! \todo We need system locking here for secondary threads! #if FLEXT_SYS == FLEXT_SYS_JMAX @@ -159,11 +162,14 @@ void flext_root::operator delete(void *blk) char *ori = (char *)blk-sizeof(size_t); size_t bytes = *(size_t *)ori; +#ifdef FLEXT_NOGLOBALNEW if(bytes >= LARGEALLOC) { // use C library function for large memory blocks ::operator delete(ori); } - else { + else +#endif + { //! \todo We need system locking here for secondary threads! #if FLEXT_SYS == FLEXT_SYS_JMAX @@ -181,11 +187,14 @@ void *flext_root::NewAligned(size_t bytes,int bitalign) bytes += ovh+alignovh; char *blk; +#ifdef FLEXT_NOGLOBALNEW if(bytes >= LARGEALLOC) { // use C library function for large memory blocks blk = (char *)::operator new(bytes); } - else { + else +#endif + { //! \todo We need system locking here for secondary threads! #if FLEXT_SYS == FLEXT_SYS_JMAX @@ -206,11 +215,14 @@ void flext_root::FreeAligned(void *blk) char *ori = *(char **)((char *)blk-sizeof(size_t)-sizeof(char *)); size_t bytes = *(size_t *)((char *)blk-sizeof(size_t)); +#ifdef FLEXT_NOGLOBALNEW if(bytes >= LARGEALLOC) { // use C library function for large memory blocks ::operator delete(ori); } - else { + else +#endif + { //! \todo We need system locking here for secondary threads! #if FLEXT_SYS == FLEXT_SYS_JMAX |