3 ms·
1. The current version of the library contains a profound design flaw - it allocates memory. What do you mean by that?, or could you elaborate how will you des
by ehmmm 11y ago
1. The current version of the library contains a profound design flaw - it allocates memory.
What do you mean by that?, or could you elaborate how will you design it to not allocate any heap memory?
- lfds-admin 11y agoThe design of memory access behaviour is absolutely paramount in high performance software. Such software has a great deal of time and effort invested in the design to minimize memory accesses and, where they must occur, to make them cache friendly - for example, ensuring the buffer used for something being read from is allocated next to the buffer being used to write to, so they will both be covered by a single TLB lookup. This requires complete control over memory allocation. A library which not only makes its own allocations but even more staggeringly at run-time, is beyond the pale - absolutely unusable. The next release performs no memory allocation; all allocation is performed by the user and passed into the function calls as pointers to those allocations. Users can still of course perform run-time allocations if they wish, but now they can also fully pre-allocate, in ways which are memory access friendly given the work being performed by their software.
- ehmmm 11y agoInteresting choice. One is still able to add a module that wraps the calls with a custom allocator.