Unsafe.InitBlockUnaligned Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
InitBlockUnaligned(Byte, Byte, UInt32) |
Initializes a block of memory at the given location with a given initial value without assuming architecture dependent alignment of the address. |
InitBlockUnaligned(Void*, Byte, UInt32) |
Initializes a block of memory at the given location with a given initial value without assuming architecture dependent alignment of the address. |
InitBlockUnaligned(Byte, Byte, UInt32)
- Source:
- Unsafe.cs
- Source:
- Unsafe.cs
- Source:
- Unsafe.cs
Important
This API is not CLS-compliant.
Initializes a block of memory at the given location with a given initial value without assuming architecture dependent alignment of the address.
public:
static void InitBlockUnaligned(System::Byte % startAddress, System::Byte value, System::UInt32 byteCount);
public static void InitBlockUnaligned (ref byte startAddress, byte value, uint byteCount);
[System.CLSCompliant(false)]
public static void InitBlockUnaligned (ref byte startAddress, byte value, uint byteCount);
static member InitBlockUnaligned : byte * byte * uint32 -> unit
[<System.CLSCompliant(false)>]
static member InitBlockUnaligned : byte * byte * uint32 -> unit
Public Shared Sub InitBlockUnaligned (ByRef startAddress As Byte, value As Byte, byteCount As UInteger)
Parameters
- startAddress
- Byte
The managed pointer referencing the start of the memory block to initialize.
- value
- Byte
The value to initialize all bytes of the memory block to.
- byteCount
- UInt32
The number of bytes to initialize.
- Attributes
Remarks
This API corresponds to the unaligned.1 initblk
opcode sequence. No alignment assumption is made about the startAddress
pointer. See ECMA-335, Sec. III.3.36 ("initblk - initialize a block of memory to a value") and Sec. III.2.5 ("unaligned. (prefix) - pointer instruction might be unaligned") for more information.
Caution
This API is not intended for initializing arbitrary-length runs of memory. Consider instead using Fill for this scenario.
Applies to
InitBlockUnaligned(Void*, Byte, UInt32)
- Source:
- Unsafe.cs
- Source:
- Unsafe.cs
- Source:
- Unsafe.cs
Important
This API is not CLS-compliant.
Initializes a block of memory at the given location with a given initial value without assuming architecture dependent alignment of the address.
public:
static void InitBlockUnaligned(void* startAddress, System::Byte value, System::UInt32 byteCount);
public static void InitBlockUnaligned (void* startAddress, byte value, uint byteCount);
[System.CLSCompliant(false)]
public static void InitBlockUnaligned (void* startAddress, byte value, uint byteCount);
static member InitBlockUnaligned : nativeptr<unit> * byte * uint32 -> unit
[<System.CLSCompliant(false)>]
static member InitBlockUnaligned : nativeptr<unit> * byte * uint32 -> unit
Parameters
- startAddress
- Void*
The unmanaged pointer referencing the start of the memory block to initialize.
- value
- Byte
The value to initialize all bytes of the memory block to.
- byteCount
- UInt32
The number of bytes to initialize.
- Attributes
Remarks
This API corresponds to the unaligned.1 initblk
opcode sequence. No alignment assumption is made about the startAddress
pointer. See ECMA-335, Sec. III.3.36 ("initblk - initialize a block of memory to a value") and Sec. III.2.5 ("unaligned. (prefix) - pointer instruction might be unaligned") for more information.
Caution
This API is not intended for initializing arbitrary-length runs of memory. Consider instead using Fill for this scenario.