aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc/system_alloc/defalloc.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-10-12 15:40:31 +0000
committerlloyd <[email protected]>2010-10-12 15:40:31 +0000
commit18a58396b7bb2925a33c57b17f1820b386b54c2d (patch)
tree42b2707148ffc2a869f7bb44507ec575e0067d10 /src/alloc/system_alloc/defalloc.cpp
parentff173a4edb68992d30deed57590fd04c54488a93 (diff)
s/u32bit/size_t/ in alloc
Also handle partial writes in alloc_mmap
Diffstat (limited to 'src/alloc/system_alloc/defalloc.cpp')
-rw-r--r--src/alloc/system_alloc/defalloc.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/alloc/system_alloc/defalloc.cpp b/src/alloc/system_alloc/defalloc.cpp
index 3161716b9..8e178bb14 100644
--- a/src/alloc/system_alloc/defalloc.cpp
+++ b/src/alloc/system_alloc/defalloc.cpp
@@ -18,7 +18,7 @@ namespace {
/*
* Perform Memory Allocation
*/
-void* do_malloc(u32bit n, bool do_lock)
+void* do_malloc(size_t n, bool do_lock)
{
void* ptr = std::malloc(n);
@@ -35,7 +35,7 @@ void* do_malloc(u32bit n, bool do_lock)
/*
* Perform Memory Deallocation
*/
-void do_free(void* ptr, u32bit n, bool do_lock)
+void do_free(void* ptr, size_t n, bool do_lock)
{
if(!ptr)
return;
@@ -52,7 +52,7 @@ void do_free(void* ptr, u32bit n, bool do_lock)
/*
* Malloc_Allocator's Allocation
*/
-void* Malloc_Allocator::allocate(u32bit n)
+void* Malloc_Allocator::allocate(size_t n)
{
void* ptr = do_malloc(n, false);
if(!ptr)
@@ -63,7 +63,7 @@ void* Malloc_Allocator::allocate(u32bit n)
/*
* Malloc_Allocator's Deallocation
*/
-void Malloc_Allocator::deallocate(void* ptr, u32bit n)
+void Malloc_Allocator::deallocate(void* ptr, size_t n)
{
do_free(ptr, n, false);
}
@@ -71,7 +71,7 @@ void Malloc_Allocator::deallocate(void* ptr, u32bit n)
/*
* Locking_Allocator's Allocation
*/
-void* Locking_Allocator::alloc_block(u32bit n)
+void* Locking_Allocator::alloc_block(size_t n)
{
return do_malloc(n, true);
}
@@ -79,7 +79,7 @@ void* Locking_Allocator::alloc_block(u32bit n)
/*
* Locking_Allocator's Deallocation
*/
-void Locking_Allocator::dealloc_block(void* ptr, u32bit n)
+void Locking_Allocator::dealloc_block(void* ptr, size_t n)
{
do_free(ptr, n, true);
}