# SmallStackSafeStackAlloc< T, length > Struct Template Reference

A small 'wrapper' for allocations that can be done on most OSes on the stack, but are just too large to fit in the stack on devices with a small stack such as the NDS. More...

`#include <alloc_func.hpp>`

## Public Member Functions
| operator T * ()
| Gets a pointer to the data stored in this wrapper.
## Data Fields
T | data [length]
| Storing the data on the stack.

## Detailed Description

### template<typename T, size_t length>
struct SmallStackSafeStackAlloc< T, length >

A small 'wrapper' for allocations that can be done on most OSes on the stack, but are just too large to fit in the stack on devices with a small stack such as the NDS.

So when it is possible a stack allocation is made, otherwise a heap allocation is made and this is freed once the struct goes out of scope.

Parameters:

  | T | the type to make the allocation for
  | length | the amount of items to allocate

Definition at line 103 of file alloc_func.hpp.

## Member Function Documentation

template<typename T, size_t length>

SmallStackSafeStackAlloc< T, length >::operator T * | ( |  | ) | `[inline]`

Gets a pointer to the data stored in this wrapper.

Returns:
  the pointer.

Definition at line 121 of file alloc_func.hpp.

References SmallStackSafeStackAlloc< T, length >::data.

The documentation for this struct was generated from the following file:

- src/core/alloc_func.hpp