JasPer 4.0.0 |

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
jas_allocator_s Struct Reference
Memory Allocation

A memory allocator. More...

`#include <jas_malloc.h>`

## Public Member Functions

void | reserved (void)

## Public Attributes

void(* | cleanup )(struct jas_allocator_s *allocator)
void *(* | alloc )(struct jas_allocator_s *allocator, size_t size)
void(* | free )(struct jas_allocator_s *allocator, void *pointer)
void *(* | realloc )(struct jas_allocator_s *allocator, void *pointer, size_t new_size)

## Detailed Description

A memory allocator.

## Member Function Documentation

## ◆ reserved()

void jas_allocator_s::reserved | ( | void |  | ) |

For future use.

## Member Data Documentation

## ◆ alloc

void *(* jas_allocator_s::alloc) (struct jas_allocator_s *allocator, size_t size)

Function to allocate memory. This function should have behavior similar to malloc.

## ◆ cleanup

void(* jas_allocator_s::cleanup) (struct jas_allocator_s *allocator)

Function to clean up the allocator when no longer needed. The allocator cannot be used after the clean-up operation is performed. This function pointer may be null, in which case the clean-up operation is treated as a no-op.

## ◆ free

void(* jas_allocator_s::free) (struct jas_allocator_s *allocator, void *pointer)

Function to deallocate memory. This function should have behavior similar to free.

## ◆ realloc

void *(* jas_allocator_s::realloc) (struct jas_allocator_s *allocator, void *pointer, size_t new_size)

Function to reallocate memory. This function should have behavior similar to realloc.

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

- jas_malloc.h