Re:They say that stocks go down during the day and up at night
by recursive on Tuesday February 07, 2023 @01:19PM
(#34696708)
The grocery analogy doesn't work. When you're "done" with a particular "grocery", it's gone. It doesn't exist anymore. When you're done using a block of memory, you can use it again and again and again. Assuming you remembered to free it. Groceries work more like write-once memory.
Still sounds like a leak to me.
Re:They say that stocks go down during the day and up at night
by TeMPOraL on Wednesday February 08, 2023 @06:34PM
(#34717310)
It's a "leak" only if it creates problems for you, such as slowdown or risk of running out of memory. In this case, there are no such problems - memory use and execution time are both bounded. The memory gets automatically reclaimed when the program restarts (that's the job of the OS, and if it fails at it, you can always reboot the machine).
It's a perfectly fine way of engineering a system.
There's also a variant of this that's been used on missiles - basically, you put enough RAM on the weapon to guarantee it'll hit its target or run out of fuel before running out of memory.
I buy all the groceries I need from now until the end of time. That's not realistically achievable, from any perspective.
Allocating all the memory you need for a day is realistically achievable. Allocating all the memory you need until the end of time is not realistically achievable.