Skip to content

Custom allocator #310

@abnara

Description

@abnara

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions