/// <summary> /// allocate memory. The memory is set to zero. /// </summary> public static Addr AllocateCleared(USize n, GFP flags) { var addr = Allocate(n, flags); MemoryOperation.Clear(addr, n); return(addr); }
/// <summary> /// allocate memory for an array. The memory is set to zero. /// </summary> public static Addr AllocateArrayCleared(USize elements, USize size, GFP flags) { var total = elements * size; var addr = Allocate(total, flags); MemoryOperation.Clear(addr, total); return(addr); }