mem-isolate: Safely Running Unsafe Code
2025-04-06
mem-isolate executes your function via a fork(), waits for the result, and returns it to the parent process, preventing unsafe code from affecting the parent's memory footprint. It handles memory leaks and heap fragmentation, enforcing memory purity even for impure functions. Currently supporting only Unix-like systems, it adds approximately 1ms overhead compared to direct function calls—a reasonable trade-off for memory safety in critical applications.