2 ms·
You can guarantee the heap will not be touched in any code that: - does not use malloc or new - does not call any function that uses malloc or new When you do
by humanrebar 13y ago
You can guarantee the heap will not be touched in any code that:
- does not use malloc or new
- does not call any function that uses malloc or new
When you do that, you make allocation decisions orthogonal to the algorithm. This is how all the std algorithms are implemented.
Haskell also separates allocation from algorithm, but it so by making decisions for the programmer -- by using GC. This is not an acceptable trade-off for a C++ developer or else she would be using a different language (or smart pointers).
- sixbrx 13y ago> You can guarantee the heap will not be touched in any code > that: - does not use malloc or new - does not call any > function that uses malloc or new Which is extremely limiting, in the context of data analysis chains like the examples given.
- humanrebar 13y agoNo it isn't. You just need C++ libraries that do data analysis chains in a similar way. There are examples elsewhere in the comments here.