News for hackers. Stuff that matters.
Re:Exploring the software that flies SpaceX rockets and star... by bombcar on Tuesday May 11, 2021 @09:23AM (#27117777)
They've been known to leak memory ...

https://devblogs.microsoft.com/oldnewthing/20180228-00/?p=98...

>This sparked an interesting memory for me. I was once working with a customer who was producing on-board software for a missile. In my analysis of the code, I pointed out that they had a number of problems with storage leaks. Imagine my surprise when the customers chief software engineer said "Of course it leaks". He went on to point out that they had calculated the amount of memory the application would leak in the total possible flight time for the missile and then doubled that number. They added this much additional memory to the hardware to "support" the leaks. Since the missile will explode when it hits its target or at the end of its flight, the ultimate in garbage collection is performed without programmer intervention.

Re:Exploring the software that flies SpaceX rockets and star... by TchoBeer on Tuesday May 11, 2021 @09:57AM (#27118172)
I think we've solved the GC vs Manual debate. Just add more RAM and explode your computer when it's done running
Re:Exploring the software that flies SpaceX rockets and star... by rm445 on Tuesday May 11, 2021 @11:02AM (#27118911)
Very funny. But leak memory until you have to restart the process seems to be a very common strategy in practice. The programs explode even if the computer doesn't.
Re:Exploring the software that flies SpaceX rockets and star... by TchoBeer on Tuesday May 11, 2021 @11:58AM (#27119705)
Many moons ago I remember talking with someone who works in HFT software and they said they'd just load the system with tons of RAM because allocation/deallocation and even manual memory management was too slow.
Re:Exploring the software that flies SpaceX rockets and star... by crazypython on Tuesday May 11, 2021 @10:05AM (#27118254)
Really, this is just region-based memory management or actor-based memory management.
Re:Exploring the software that flies SpaceX rockets and star... by mottosso on Tuesday May 11, 2021 @02:37PM (#27121790)
It's actually rocket-based memory management. Ba dum tss!
Re:Exploring the software that flies SpaceX rockets and star... by HeyLaughingBoy on Tuesday May 11, 2021 @01:32PM (#27120919)
Reminds me of an old discussion in comp.arch.embedded (dating myself here!) about what you say when people at a party ask you what you do.

Hands down best answer was the engineer from a defense company: "I build flying robots that arrive at their destination in a really bad mood."

Re:Exploring the software that flies SpaceX rockets and star... by jetrink on Tuesday May 11, 2021 @10:04AM (#27118242)
That is a great story, but I cringed at the part about adding additional hardware to support their leaky code. Surely there had to be a better way?
Re:Exploring the software that flies SpaceX rockets and star... by bodhiandphysics on Tuesday May 11, 2021 @10:29AM (#27118508)
Don’t overengineer! Malloc has o(n) time in reallocs, so leaking memory can be a viable strategy

Edit: yes I know it’s more complicated than that!

Re:Exploring the software that flies SpaceX rockets and star... by TchoBeer on Tuesday May 11, 2021 @12:04PM (#27119799)
Allocating/deallocating memory has a cost, if you can afford to just add more memory that's faster than any clever memory management solution you have.