-
Notifications
You must be signed in to change notification settings - Fork 12
Description
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.