aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/flext/source/flsupport.cpp
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2003-08-06 02:32:50 +0000
committerThomas Grill <xovo@users.sourceforge.net>2003-08-06 02:32:50 +0000
commit78c44b42bf4a07b0caf7d27b1dfb4725f14531f6 (patch)
treeb2a622b0202e55f14b507527970d5dc3b5c5c767 /externals/grill/flext/source/flsupport.cpp
parent5aeb36ec9e7aaee34ce8f5f248029d39047e2918 (diff)
""
svn path=/trunk/; revision=828
Diffstat (limited to 'externals/grill/flext/source/flsupport.cpp')
-rw-r--r--externals/grill/flext/source/flsupport.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/externals/grill/flext/source/flsupport.cpp b/externals/grill/flext/source/flsupport.cpp
index b27196b8..eca73d90 100644
--- a/externals/grill/flext/source/flsupport.cpp
+++ b/externals/grill/flext/source/flsupport.cpp
@@ -82,11 +82,18 @@ void flext::Setup()
void *flext::operator new(size_t bytes)
{
bytes += sizeof(size_t);
+
+#ifdef FLEXT_DEBUG
+ if(bytes > 32000)
+ post("flext - warning: excessive memory allocation of %i bytes",bytes);
+#endif
+
#if FLEXT_SYS == FLEXT_SYS_JMAX
char *blk = (char *)::fts_malloc(bytes);
#else
char *blk = (char *)::getbytes(bytes);
#endif
+
*(size_t *)blk = bytes;
return blk+sizeof(size_t);
}