facil-io / cstl

facil.io C STL - a Server Toolbox Library for C, including JSON processing, hash maps, dynamic arrays, binary strings and more.
https://facil.io
MIT License
71 stars 6 forks source link

Update array implementation and import updates #1

Closed boazsegev closed 4 years ago

boazsegev commented 4 years ago

The new array implementation supports embedded arrays (great for void* couplets), which avoid excess memory allocations and could improve locality without requiring more memory.

This feature could be disabled by setting the FIO_ARRAY_ENABLE_EMBEDDED macro to 0.

In addition, while working on this I made updates to other pieces of code, such as adding support for "lucky realloc" (no memory copying) and other tweaks.

boazsegev commented 4 years ago

The CI errors relate to C++ support which requires the latest C++20a (draft) and some compilers in the test suite don't support.

Reviewing the test results shows that things work as expected with C.