Re:A Database Without Dynamic Memory Allocation
by colejohnson66 on Thursday October 13, 2022 @01:39PM
(#33194167)
IIRC, .NET does something similar for OutOfMemoryExceptions. The exception is thrown before actually running out of memory. That allows just enough space for the OutOfMemoryException object (and associated exception info) to be allocated.
[ Parent
| on HN ]
Re:A Database Without Dynamic Memory Allocation
by znpy on Thursday October 13, 2022 @03:14PM
(#33195230)
Iirc also perl does this. Iām on the phone right now, but iirc $^O was a variable filled with about 20k of worthless data that could be freed in case of an out of memory condition.
Re:A Database Without Dynamic Memory Allocation
by gloria_mundi on Friday October 14, 2022 @08:39AM
(#33202723)
It's called $^M, and you have to explicitly fill it with garbage.