ONE - On-device Neural Engine
Loading...
Searching...
No Matches
flatbuffers::DefaultAllocator Class Reference

#include <flatbuffers.h>

Collaboration diagram for flatbuffers::DefaultAllocator:

Public Member Functions

uint8_t * allocate (size_t size) FLATBUFFERS_OVERRIDE
 
void deallocate (uint8_t *p, size_t) FLATBUFFERS_OVERRIDE
 
- Public Member Functions inherited from flatbuffers::Allocator
virtual ~Allocator ()
 
virtual uint8_t * reallocate_downward (uint8_t *old_p, size_t old_size, size_t new_size, size_t in_use_back, size_t in_use_front)
 

Static Public Member Functions

static void dealloc (void *p, size_t)
 

Additional Inherited Members

- Protected Member Functions inherited from flatbuffers::Allocator
void memcpy_downward (uint8_t *old_p, size_t old_size, uint8_t *new_p, size_t new_size, size_t in_use_back, size_t in_use_front)
 

Detailed Description

Definition at line 717 of file flatbuffers.h.

Member Function Documentation

◆ allocate()

uint8_t * flatbuffers::DefaultAllocator::allocate ( size_t  size)
inlinevirtual

Implements flatbuffers::Allocator.

Definition at line 720 of file flatbuffers.h.

720{ return new uint8_t[size]; }
int32_t size[5]
Definition Slice.cpp:35

References size.

Referenced by flatbuffers::Allocate().

◆ dealloc()

static void flatbuffers::DefaultAllocator::dealloc ( void *  p,
size_t   
)
inlinestatic

Definition at line 724 of file flatbuffers.h.

724{ delete[] static_cast<uint8_t *>(p); }

◆ deallocate()

void flatbuffers::DefaultAllocator::deallocate ( uint8_t *  p,
size_t   
)
inlinevirtual

Implements flatbuffers::Allocator.

Definition at line 722 of file flatbuffers.h.

722{ delete[] p; }

Referenced by flatbuffers::Deallocate().


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