Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ckormanyos opened this issue Jun 22, 2021 · 1 comment
Open

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

ckormanyos opened this issue Jun 22, 2021 · 1 comment
Assignees

Comments

@ckormanyos
Copy link
Member

ckormanyos commented Jun 22, 2021

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
Copy link
Member Author

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)

@ckormanyos ckormanyos self-assigned this Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant