News for hackers. Stuff that matters.
Re:Heap on Embedded Devices: Analysis and Improvement by omgtehlion on Wednesday January 27, 2016 @09:34AM (#10980154)
Wow wow, if you are using a heap on really small embedded device you're gonna have a bad time any way.

Embedded engineering 101: statically allocate everything, and try not to push the stack too much. But you can not do this with JS :(

Re:Heap on Embedded Devices: Analysis and Improvement by phkahler on Wednesday January 27, 2016 @10:38AM (#10980567)
>> if you are using a heap on really small embedded device you're gonna have a bad time any way.

Yep. malloc() is generally discouraged on those things and should be seen as a big red flag in any code review.

Re:Heap on Embedded Devices: Analysis and Improvement by chillingeffect on Wednesday January 27, 2016 @03:44PM (#10983149)
Yes that is Embedded 101. How about 201, 301, 401 and the real world? Dynamic allocation happens. Parsing XML and OSC happens. Recording sequences of various lengths happens. It makes sense to apply intelligence to dynamic allocation.
Re:Heap on Embedded Devices: Analysis and Improvement by omgtehlion on Wednesday January 27, 2016 @07:51PM (#10985038)
In a real world this is even more critical: you don't want, for example, your car brakes to fail because of OOM.
Re:Heap on Embedded Devices: Analysis and Improvement by RealityVoid on Thursday January 28, 2016 @02:31AM (#10986897)
I think it really depends on your application. Car systems are pretty predictable with regards to messages received, they don't have random users sending impredictable data. I'm a SWE writing firmware for cars and I've got to admit, I never caught myself thinking: "Gee, I could sure use the heap right now!"