v0.2.1
Fast, portable C library for geometry input/output
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Modules
Data Fields
gmio_memblock Struct Reference

Basic memory block. More...

Data Fields

void * ptr
 Pointer to the beginning of the memory block. More...
 
size_t size
 Size (in bytes) of the memory block. More...
 
void(* func_deallocate )(void *ptr)
 Optional pointer on a function that deallocates the memory block beginning at ptr. More...
 

Detailed Description

Basic memory block.

gmio_memblock comes with convenient constructors that binds to <stdlib.h> allocation functions, like gmio_memblock_malloc(), ...

Binding gmio_memblock to some statically-allocated memory is done through gmio_memblock() :

char buff[512] = {0};
struct gmio_memblock blk =
gmio_memblock(buff, GMIO_ARRAY_SIZE(buff), NULL);

Any gmio_memblock object can be safely freed with gmio_memblock_deallocate()

Field Documentation

void(* gmio_memblock::func_deallocate)(void *ptr)

Optional pointer on a function that deallocates the memory block beginning at ptr.

See also
gmio_memblock_deallocate()
void* gmio_memblock::ptr

Pointer to the beginning of the memory block.

size_t gmio_memblock::size

Size (in bytes) of the memory block.


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