Skip to main content

Mojo function

memset

memset(ptr: LegacyUnsafePointer[type, address_space=address_space, origin=origin], value: UInt8, count: Int)

Fills memory with the given value.

Args:

  • โ€‹ptr (LegacyUnsafePointer): UnsafePointer to the beginning of the memory block to fill.
  • โ€‹value (UInt8): The value to fill with.
  • โ€‹count (Int): Number of elements to fill (in elements, not bytes).

Was this page helpful?