3 ms·
It is quite possible to write to files, stdout, etc without using any heap memory. It can be achieved with the bare bones read/write syscalls. I'm not sure I wo
by webkike 11y ago
It is quite possible to write to files, stdout, etc without using any heap memory. It can be achieved with the bare bones read/write syscalls. I'm not sure I would consider this a "best practice", but it's worth noting. Boehm GC actively uses read when it needs to read files without allocating any heap memory.
- justincormack 11y agoIn general, for a library, this is not good practise. For an application, it may work. You have to be very careful to not use any formatted output.