tryRawAllocate

Requests an alignment-byte aligned block of memory of count * elementSize bytes from allocator.

If zeroFill is true the returned memory will be zero-filled.

If allocation fails rawAllocate will also call $(COREREF exception, onOutOfMemoryError) which is expected to throw an $(COREREF exception, OutOfMemoryError).

Preconditions: alignment != 0 && elementSize % alignment == 0 && count != 0

  1. void* rawAllocate(A allocator, size_t alignment, size_t elementSize, size_t count, bool zeroFill, bool gcScan)
  2. void* tryRawAllocate(A allocator, size_t alignment, size_t elementSize, size_t count, bool zeroFill, bool gcScan)
    void*
    tryRawAllocate
    (
    A
    )
    (
    ref A allocator
    ,
    in size_t alignment
    ,
    in size_t elementSize
    ,
    in size_t count
    ,
    in bool zeroFill = true
    ,
    in bool gcScan = false
    )

Return Value

Type: void*

A pointer to the allocated memory or null if allocaton failed.

Meta