News for hackers. Stuff that matters.
Re:Is RAM wiped before use in another LXC container? by Asooka on Wednesday April 05, 2023 @05:23PM (#35460551)
I have used fork as a stupid simple memory arena implementation. fork(); do work in the child; only malloc, never free; exit. It is much, much heavier than a normal memory arena would be, but also much simpler to use. Plus, if you can split the work in independent batches, you can run multiple children at a time in parallel.

As with all such stupid simple mechanisms, I would not advise its use if your program spans more than one .c file and more than a thousand lines.

Re:Is RAM wiped before use in another LXC container? by saagarjha on Thursday April 06, 2023 @04:42AM (#35465840)
This isn't advisable in many more contexts than that: for example, your calls to malloc can block indefinitely if locks were held at the time of fork.