|
YAVL 0.1.0
Yet Another Vector Library – still better than C++ impl. :P
|
Type-agnostic vector definition. More...
#include <vec.h>
Public Attributes | |
| void * | data |
| Pointer to data array. | |
| size_t | allign |
| Current data allignment (size of individual vector element in unsigned chars). | |
| size_t | len |
| Current data length. | |
| size_t | reservd |
| Currently reserved data. | |
Type-agnostic vector definition.
It stores data on heap, although the metadata can be stored wherever, with stack being recommended when vector is being used as an intermediate type for array generation. The metadata has to be detached from data, as memory usage for data is assumed to be very volatile and it is preffered to drop metadata when converting to the regular C arrays.
| void* yavl_vec_t::data |
Pointer to data array.
Raw access is considered unsafe and requires additional memory checks done automatically by the library.
| size_t yavl_vec_t::len |
Current data length.
Should be used for array bounds.
| size_t yavl_vec_t::reservd |
Currently reserved data.
Should be used for memory calculations.