| synopsis || functions |

kdu_sample_allocator

Java: Kdu_sample_allocator

[Declared in "../coresys/common/kdu_sample_processing.h"]


Synopsis

This object serves to prevent excessive memory fragmentation. Pre-allocation requests are made by all clients which wish to use its services, after which a single block of memory is allocated and the actual allocation requests must be made — these must be identical to the pre-allocation requests. Memory chunks allocated by this object to a client may not be individually returned or recycled, since this incurs overhead and fragmentation.

The object may be re-used (after a call to its restart member) once all memory served out is no longer in use. When re-used, the object makes every attempt to avoid destroying and re-allocating its memory block. This avoids memory fragmentation and allocation overhead when processing images with multiple tiles or when used for video applications.


Public Functions

kdu_sample_allocator {Java: Kdu_sample_allocator}

~kdu_sample_allocator {Java: Native_destroy}

restart {Java: Restart}

pre_alloc {Java: Pre_alloc}

finalize {Java: Finalize}

alloc16

alloc32

get_size {Java: Get_size}


| top || synopsis || functions |