ESPHome 2026.1.1
Loading...
Searching...
No Matches
esphome::SmallBufferWithHeapFallback< STACK_SIZE > Class Template Reference

Helper class for efficient buffer allocation - uses stack for small sizes, heap for large This is useful when most operations need a small buffer but occasionally need larger ones. More...

#include <helpers.h>

Public Member Functions

 SmallBufferWithHeapFallback (size_t size)
 
 ~SmallBufferWithHeapFallback ()
 
 SmallBufferWithHeapFallback (const SmallBufferWithHeapFallback &)=delete
 
SmallBufferWithHeapFallbackoperator= (const SmallBufferWithHeapFallback &)=delete
 
 SmallBufferWithHeapFallback (SmallBufferWithHeapFallback &&)=delete
 
SmallBufferWithHeapFallbackoperator= (SmallBufferWithHeapFallback &&)=delete
 
uint8_t * get ()
 

Detailed Description

template<size_t STACK_SIZE>
class esphome::SmallBufferWithHeapFallback< STACK_SIZE >

Helper class for efficient buffer allocation - uses stack for small sizes, heap for large This is useful when most operations need a small buffer but occasionally need larger ones.

The stack buffer avoids heap allocation in the common case, while heap fallback handles edge cases.

Definition at line 368 of file helpers.h.

Constructor & Destructor Documentation

◆ SmallBufferWithHeapFallback() [1/3]

template<size_t STACK_SIZE>
esphome::SmallBufferWithHeapFallback< STACK_SIZE >::SmallBufferWithHeapFallback ( size_t size)
inlineexplicit

Definition at line 370 of file helpers.h.

◆ ~SmallBufferWithHeapFallback()

template<size_t STACK_SIZE>
esphome::SmallBufferWithHeapFallback< STACK_SIZE >::~SmallBufferWithHeapFallback ( )
inline

Definition at line 378 of file helpers.h.

◆ SmallBufferWithHeapFallback() [2/3]

template<size_t STACK_SIZE>
esphome::SmallBufferWithHeapFallback< STACK_SIZE >::SmallBufferWithHeapFallback ( const SmallBufferWithHeapFallback< STACK_SIZE > & )
delete

◆ SmallBufferWithHeapFallback() [3/3]

template<size_t STACK_SIZE>
esphome::SmallBufferWithHeapFallback< STACK_SIZE >::SmallBufferWithHeapFallback ( SmallBufferWithHeapFallback< STACK_SIZE > && )
delete

Member Function Documentation

◆ get()

template<size_t STACK_SIZE>
uint8_t * esphome::SmallBufferWithHeapFallback< STACK_SIZE >::get ( )
inline

Definition at line 386 of file helpers.h.

◆ operator=() [1/2]

template<size_t STACK_SIZE>
SmallBufferWithHeapFallback & esphome::SmallBufferWithHeapFallback< STACK_SIZE >::operator= ( const SmallBufferWithHeapFallback< STACK_SIZE > & )
delete

◆ operator=() [2/2]

template<size_t STACK_SIZE>
SmallBufferWithHeapFallback & esphome::SmallBufferWithHeapFallback< STACK_SIZE >::operator= ( SmallBufferWithHeapFallback< STACK_SIZE > && )
delete

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