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: Allocator
T: type
alignment: ?u29null means naturally aligned
n: usize
Possible Errors
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());
}