Skip to content

Make the allocator optional #50

@bifurcation

Description

@bifurcation

In an effort to not depend on the C++ allocator, #47 introduced custom vector<T, N> and map<K, V, N> types, which use fixed-size stack-allocated storage. This has a couple of unfortunate side effects . First, the vector and map types have to be exposed to callers, when they're really intended as internal implementation details. Second, callers are locked into whatever fixed limits these types have, unable to benefit from extra memory on machines that have it.

We should enable the caller to choose whether to use fixed or dynamic allocations, and if fixed, how big the storage should be. Ideally, in a way that hides the fine-grained vector and map types. For example, we might define an abstract class KeyStorage and have the caller provide an instance as a pointer or reference. This would be somewhat analogous to the approach libsrtp took with regard to stream list storage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions