Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Of course.

When I wrote that comment I asked myself should I have written "malloc" or "malloc/free" - surely one implies the other.



For short-lived processes that do lots of allocations and where you can rely on the OS to release resources, just leaving out the deallocations is often faster.

Of course, you need to be careful as if you write code like that in a language without garbage collection, it's inherently not reuseable - retrofitting deallocation is often really painful because it gets easy to adopt patterns that make object ownership etc. unclear when you don't have to ensure it's easy to deallocate in the right order.


Not surely. Many programs are written in a way that allocates all the needed heap space at startup, and just reuse it forever. And those are overrepresented on the minimal-system kinds of environment.


Oh well, with 16 GB RAM even in laptops, who needs free anymore? Just restart the program. It's simpler anyway.


ironic for a minimalist/anti bloat pamphlet to start with "with 16GB ..."




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: