reorganize headers and add CpuFill macros

This commit is contained in:
YamaArashi
2016-01-08 12:49:23 -08:00
parent b06f500539
commit bc10815b94
6 changed files with 49 additions and 33 deletions

View File

@@ -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;