FillMemory function kernel32

void FillMemory(
  1. Pointer<NativeType> destination,
  2. int length,
  3. int fill
)

Fills a block of memory with a specified value.

Implementation

void FillMemory(Pointer destination, int length, int fill) {
  final ptr = destination.cast<Uint8>();
  for (var i = 0; i < length; i++) {
    ptr[i] = fill;
  }
}