by bruce343434 · 3y ago · 0 comments
[0] For more details, see e.g. https://nullprogram.com/blog/2019/10/27/
I was not suggesting that any of both is a good idea - but they are tools 'for programs where the amount of items you must store is only known at run time.' (Assuming that not having to free is considered "automatic memory management").
Of course you are right that it's not the same as using e.g. a Python List.
Furthermore, neither does any memory management, the memory is retained till the end of the program. "Simple memory acquisition" perhaps, "memory management" not, except if we accept it as a degenerate case, where things aren't even freed except when the program ends.
Usually it's not necessary to load everything into memory. It's usually more efficient to process data similar to map-reduce, and just use stdio and stdout