From bc10815b94083bde9a4fa034a647e294ce2022cc Mon Sep 17 00:00:00 2001 From: YamaArashi Date: Fri, 8 Jan 2016 12:49:23 -0800 Subject: reorganize headers and add CpuFill macros --- src/malloc.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/malloc.c') diff --git a/src/malloc.c b/src/malloc.c index 49f940b7b..8bfaf5ef0 100644 --- a/src/malloc.c +++ b/src/malloc.c @@ -132,16 +132,10 @@ void *AllocZeroedInternal(void *heapStart, u32 size) void *mem = AllocInternal(heapStart, size); if (mem != NULL) { - u32 zero; - u32 sizeInWords; - if (size & 3) size = 4 * ((size / 4) + 1); - zero = 0; - sizeInWords = (size << 9) >> 11; - - CpuSet(&zero, mem, CPU_SET_32BIT | CPU_SET_SRC_FIX | sizeInWords); + CpuFill32(mem, 0, size); } return mem; -- cgit v1.2.3