diff options
author | Thomas Grill <xovo@users.sourceforge.net> | 2004-03-23 03:27:37 +0000 |
---|---|---|
committer | Thomas Grill <xovo@users.sourceforge.net> | 2004-03-23 03:27:37 +0000 |
commit | ee3e77c91f690444730da3300a8169bba50a8973 (patch) | |
tree | 9c59cbbf0b080fbed1d4852a9c804840295ab53f /externals/grill/flext/source | |
parent | 7d48cee76a231c32c67130c28ce65fabaae9f451 (diff) |
""
svn path=/trunk/; revision=1469
Diffstat (limited to 'externals/grill/flext/source')
-rw-r--r-- | externals/grill/flext/source/flsupport.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
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<char *>((reinterpret_cast<unsigned long>(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)); |