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
Allowing customization of MLK_ALLOC enables consumers to implement their own memory allocation routine. Depending on how this is implemented, it may be important to know at compile time the maximum amount of memory that will be allocated (independent of this, it may be important that all memory is allocated in a single MLK_ALLOC - but that is a separate issue).
We should provide a macro to consumers providing the maximum amount of memory any routine for any parameter set will require. The name is tbd, but it could be MLK_MAX_WORKSPACE_SIZE or MLK_MAX_ALLOC.
This should be verified in the MLK_ALLOC macro via static_assert(sizeof(struct) <= MLK_MAX_WORKSPACE_SIZE) (there we can only check a single allocation) and additionally in the alloc_test (here we can check the accumulated allocations).