Function alignedAlloc [src]

Prototype

pub fn alignedAlloc( self: Allocator, comptime T: type, comptime alignment: ?u29, n: usize, ) Error![]align(alignment orelse @alignOf(T)) T

Parameters

self: AllocatorT: typealignment: ?u29null means naturally aligned n: usize

Possible Errors

OutOfMemory

Source

pub fn alignedAlloc( self: Allocator, comptime T: type, /// null means naturally aligned comptime alignment: ?u29, n: usize, ) Error![]align(alignment orelse @alignOf(T)) T { return self.allocAdvancedWithRetAddr(T, alignment, n, @returnAddress()); }