4 ms·
>I hate to break it to you, but malloc/free is not magical and O(1). Trust me, I know more about it than I'd like to. I work on embedded software with hard rea
by Kenji 10y ago
>I hate to break it to you, but malloc/free is not magical and O(1).
Trust me, I know more about it than I'd like to. I work on embedded software with hard realtime constraints and we had to remove all malloc/free calls from the critical paths.
What I don't like is people claiming garbage collection is free. It annoys me to no end. Garbage collection comes at a clear cost and you need to make a cost/benefit analysis. For your average chat application, this is okay. For video games, it might be, but it's probably already noticeable. For anything remotely realtime, forget garbage collection.
- nickpsecurity 10y ago"For anything remotely realtime, forget garbage collection." Or just use real-time, garbage collection if its costs are acceptable: https://news.ycombinator.com/item?id=14108543 https://news.ycombinator.com/item?id=14108543 At least one is deployed in DO-178B-certified systems in industry that require highest confidence and testing. That's as opposite of your implication as possible.