diff options
author | aap <aap@papnet.eu> | 2020-12-18 14:19:03 +0100 |
---|---|---|
committer | aap <aap@papnet.eu> | 2020-12-18 14:19:03 +0100 |
commit | f3a356375e084caf50eed38b06ca6885d2d92b9d (patch) | |
tree | 53300108969fc1cc9efe48d8f24d8853974465ba /src/rw/RwHelper.cpp | |
parent | Merge branch 'miami' of github.com:GTAmodding/re3 into miami (diff) | |
download | re3-f3a356375e084caf50eed38b06ca6885d2d92b9d.tar re3-f3a356375e084caf50eed38b06ca6885d2d92b9d.tar.gz re3-f3a356375e084caf50eed38b06ca6885d2d92b9d.tar.bz2 re3-f3a356375e084caf50eed38b06ca6885d2d92b9d.tar.lz re3-f3a356375e084caf50eed38b06ca6885d2d92b9d.tar.xz re3-f3a356375e084caf50eed38b06ca6885d2d92b9d.tar.zst re3-f3a356375e084caf50eed38b06ca6885d2d92b9d.zip |
Diffstat (limited to '')
-rw-r--r-- | src/rw/RwHelper.cpp | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/src/rw/RwHelper.cpp b/src/rw/RwHelper.cpp index 7d62a01c..8e41cdc9 100644 --- a/src/rw/RwHelper.cpp +++ b/src/rw/RwHelper.cpp @@ -63,45 +63,6 @@ void FlushObrsPrintfs() #endif } -void * -RwMallocAlign(RwUInt32 size, RwUInt32 align) -{ -#ifdef FIX_BUGS - uintptr ptralign = align-1; - void *mem = (void *)malloc(size + sizeof(uintptr) + ptralign); - - ASSERT(mem != nil); - - void *addr = (void *)((((uintptr)mem) + sizeof(uintptr) + ptralign) & ~ptralign); - - ASSERT(addr != nil); -#else - void *mem = (void *)malloc(size + align); - - ASSERT(mem != nil); - - void *addr = (void *)((((uintptr)mem) + align) & ~(align - 1)); - - ASSERT(addr != nil); -#endif - - *(((void **)addr) - 1) = mem; - - return addr; -} - -void -RwFreeAlign(void *mem) -{ - ASSERT(mem != nil); - - void *addr = *(((void **)mem) - 1); - - ASSERT(addr != nil); - - free(addr); -} - void DefinedState(void) { |