BoostGSoC21 / math

Boost.org math module
http://boost.org/libs/math
Boost Software License 1.0
0 stars 1 forks source link

Provide toy allocator to be used in custom allocator tests #1

Open ckormanyos opened 3 years ago

ckormanyos commented 3 years ago

The interface, as it evolves, is expected to utilize a potentially custom allocator when the caller wishes to provide one other than the default.

It would be nice to make some tests with a project-local toy allocator toi ensure that this works propoerly.

Provide such a toy allocator.

ckormanyos commented 3 years ago

Hi @Lagrang3 you can find a very simple, naive allocator within the details of my microcontroller project known as real-time-cpp.

A neat little allocator intended to be used dynamically is a ring allocator found here.

The ring allocator is intended to be used on the stack or can be slightly adapted with a dynamically allocated memory pool. When the pool overruns, it wraps to its begin. So using this allocator needs to first, let's say, size up the pool needed and adjust accordingly.

I can easily adapt this allocator to our (future tests)