You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
In an effort to not depend on the C++ allocator, #47 introduced custom
vector<T, N>
andmap<K, V, N>
types, which use fixed-size stack-allocated storage. This has a couple of unfortunate side effects . First, thevector
andmap
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
andmap
types. For example, we might define an abstract classKeyStorage
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.The text was updated successfully, but these errors were encountered: