Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ alloc()

void * stan::math::stack_alloc::alloc ( size_t  len)
inline

Return a newly allocated block of memory of the appropriate size managed by the stack allocator.

The allocated pointer will be 8-byte aligned. If the number of bytes requested is not a multiple of 8, the reserved space will be padded up to the next multiple of 8.

This function may call C++'s malloc() function, with any exceptions percolated through this function.

Parameters
lenNumber of bytes to allocate.
Returns
A pointer to the allocated memory.

Definition at line 171 of file stack_alloc.hpp.