mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
make mem alloc functions more consistent
This commit is contained in:
parent
ccfaadc775
commit
c013862b69
@ -41,8 +41,9 @@ void PutFirstMemBlockHeader(void *block, u32 size)
|
||||
PutMemBlockHeader(block, (struct MemBlock *)block, (struct MemBlock *)block, size - 16);
|
||||
}
|
||||
|
||||
void *AllocInternal(struct MemBlock *pos, u32 size)
|
||||
void *AllocInternal(void *heapStart, u32 size)
|
||||
{
|
||||
struct MemBlock *pos = (struct MemBlock *)heapStart;
|
||||
struct MemBlock *head = pos;
|
||||
struct MemBlock *splitBlock;
|
||||
u32 foundBlockSize;
|
||||
@ -128,7 +129,7 @@ void FreeInternal(void *heapStart, void *pointer)
|
||||
|
||||
void *AllocZeroedInternal(void *heapStart, u32 size)
|
||||
{
|
||||
void *mem = AllocInternal((struct MemBlock *)heapStart, size);
|
||||
void *mem = AllocInternal(heapStart, size);
|
||||
|
||||
if (mem != NULL) {
|
||||
u32 zero;
|
||||
|
Loading…
Reference in New Issue
Block a user