Barracuda Application Server C/C++ Reference
NO
Dynamic memory handling.

Detailed Description

See also
Barracuda Introduction

Classes

struct  FixedSizeAllocator
 This is a fixed size allocator implementation for the abstract interface class AllocatorIntf. More...
 

Typedefs

typedef FixedSizeAllocator FixedSizeAllocator
 This is a fixed size allocator implementation for the abstract interface class AllocatorIntf. More...
 

Functions

void * baMalloc (size_t size)
 Returns pointer to uninitialized newly-allocated space for an object of size "size", or NULL on error.
 
void * baRealloc (void *p, size_t size)
 Returns pointer to newly-allocated space for an object of size "size", initialized, to minimum of old and new sizes, to existing contents of p (if non-null), or NULL on error. More...
 
void baFree (void *p)
 Deallocates space to which it points.
 

Typedef Documentation

◆ FixedSizeAllocator

This is a fixed size allocator implementation for the abstract interface class AllocatorIntf.

The FixedSizeAllocator takes a buffer and splits the buffer up into equally sized chunks. Allocating memory larger than the chunk size or using realloc results in an error; i.e., NULL returned. One can allocate a smaller size than the chunk size, but the size will be adjusted to the chunk size.

Function Documentation

◆ baRealloc()

void* baRealloc ( void *  p,
size_t  size 
)

Returns pointer to newly-allocated space for an object of size "size", initialized, to minimum of old and new sizes, to existing contents of p (if non-null), or NULL on error.

On success, old object deallocated; otherwise unchanged.