C-Macro-Collections icon indicating copy to clipboard operation
C-Macro-Collections copied to clipboard

SAC and allocation shouldn't co-exist

Open LeoVen opened this issue 2 years ago • 0 comments

CMC_SAC makes a collection to have a fixed buffer size, possibly avoiding allocations, but the _new() function allocates the struct anyway. This can be good if the buffer size is huge and wouldn't fit on the stack.

  • [ ] Find a way to avoid having malloc, free, etc. in the code whe CMC_SAC is defined
  • [ ] Decide what to do with _new() and _init()

LeoVen avatar Feb 23 '23 08:02 LeoVen