diff options
author | YamaArashi <shadow962@live.com> | 2016-01-08 12:49:23 -0800 |
---|---|---|
committer | YamaArashi <shadow962@live.com> | 2016-01-08 12:49:23 -0800 |
commit | bc10815b94083bde9a4fa034a647e294ce2022cc (patch) | |
tree | a3cbf873d5bf1c720402c45a7f718fb744230da1 /src/malloc.c | |
parent | b06f500539b64acb7db2bc7daa439be4a2cad2f2 (diff) |
reorganize headers and add CpuFill macros
Diffstat (limited to 'src/malloc.c')
-rw-r--r-- | src/malloc.c | 8 |
1 files changed, 1 insertions, 7 deletions
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; |