diff --git a/source/lib/allocators/pool.h b/source/lib/allocators/pool.h index 3222609079..0fea403692 100644 --- a/source/lib/allocators/pool.h +++ b/source/lib/allocators/pool.h @@ -63,7 +63,7 @@ public: void* p = mem_freelist_Detach(freelist); if(p) { - ASSERT(Contains(p)); + ASSERT(Contains((uintptr_t)p)); return (T*)p; } @@ -72,7 +72,7 @@ public: void Deallocate(T* p) { - ASSERT(Contains(p)); + ASSERT(Contains((uintptr_t)p)); mem_freelist_AddToFront(freelist, p); } diff --git a/source/lib/sysdep/os/unix/uvm.cpp b/source/lib/sysdep/os/unix/uvm.cpp index 8112eb1e67..6693efb858 100644 --- a/source/lib/sysdep/os/unix/uvm.cpp +++ b/source/lib/sysdep/os/unix/uvm.cpp @@ -74,10 +74,10 @@ bool Commit(uintptr_t address, size_t size, PageType UNUSED(pageType), int prot) return true; } -bool Decommit(void* p, size_t size) +bool Decommit(uintptr_t address, size_t size) { errno = 0; - if(mmap(p, size, PROT_NONE, mmap_flags|MAP_NORESERVE|MAP_FIXED, -1, 0) == MAP_FAILED) + if(mmap((void*)address, size, PROT_NONE, mmap_flags|MAP_NORESERVE|MAP_FIXED, -1, 0) == MAP_FAILED) return false; return true; }