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

Custom allocator #310

Open
abnara opened this issue Nov 15, 2024 · 1 comment
Open

Custom allocator #310

abnara opened this issue Nov 15, 2024 · 1 comment

Comments

@abnara
Copy link

abnara commented Nov 15, 2024

Builder’s custom init function provides mechanism to provide custom allocator to flatcc builder.

The flatcc_builder_alloc_fun contains alloc and free calls. This allows multiple flatcc builders in a project to have different alloc and free functions. This just requires a new function to be sent during init.

Any reason why the same was functionality was not extended to flatcc_builder_emit_fun?
Theoretically, flatcc_builder_custom_init and emitter.c can be modified to make it behave similar to alloc_fun. But does this cause any known issues?

Similarly refmap and json_printer don’t expose this functionality.

@abnara
Copy link
Author

abnara commented Dec 4, 2024

Does someone know about this?

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