From ee3e77c91f690444730da3300a8169bba50a8973 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Tue, 23 Mar 2004 03:27:37 +0000 Subject: "" svn path=/trunk/; revision=1469 --- externals/grill/flext/source/flsupport.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'externals/grill/flext/source') diff --git a/externals/grill/flext/source/flsupport.cpp b/externals/grill/flext/source/flsupport.cpp index 543c1235..cc300b95 100644 --- a/externals/grill/flext/source/flsupport.cpp +++ b/externals/grill/flext/source/flsupport.cpp @@ -157,12 +157,16 @@ void *flext_root::operator new(size_t bytes) SYSUNLOCK(); } + FLEXT_ASSERT(blk); + *(size_t *)blk = bytes; return blk+sizeof(size_t); } void flext_root::operator delete(void *blk) { + FLEXT_ASSERT(blk); + char *ori = (char *)blk-sizeof(size_t); size_t bytes = *(size_t *)ori; @@ -213,6 +217,7 @@ void *flext_root::NewAligned(size_t bytes,int bitalign) #endif SYSUNLOCK(); } + FLEXT_ASSERT(blk); char *ablk = reinterpret_cast((reinterpret_cast(blk)+ovh+alignovh) & ~alignovh); *(char **)(ablk-sizeof(size_t)-sizeof(char *)) = blk; @@ -222,6 +227,8 @@ void *flext_root::NewAligned(size_t bytes,int bitalign) void flext_root::FreeAligned(void *blk) { + FLEXT_ASSERT(blk); + char *ori = *(char **)((char *)blk-sizeof(size_t)-sizeof(char *)); size_t bytes = *(size_t *)((char *)blk-sizeof(size_t)); -- cgit v1.2.1