Skip to content
Tech News
← Back to articles

Show HN: Threadprocs – executables sharing one address space (0-copy pointers)

read original get Shared Memory Development Kit → more articles
Why This Matters

Threadprocs introduces an innovative approach by combining process and thread models, enabling multiple programs to run within a shared address space with zero-copy pointer sharing. This development could significantly enhance inter-process communication efficiency and memory management in the tech industry, offering new possibilities for high-performance applications and systems. Its experimental nature signals potential future advancements in shared memory architectures and process management techniques.

Key Takeaways

threadprocs

This repository contains experimental code for thread-like processes, or multiple programs running in a shared address space. Each threadproc behaves like a process with its own executable, globals, libc instance, etc, but pointers are valid across threadprocs. This blends the Posix process model with the Posix multi-threading programming model, and enables things like zero-copy access to pointer-based data structures.

All Markdown files were written by hand.

See tproc-actors for one possible application framework building on top of threadprocs.

Demo

The code for the demoed programs is at example/sharedstr/allocstr.cpp and example/sharedstr/printstr.cpp , and neither contains any magic ( /proc/[pid]/mem , etc), nor awareness of the server and launcher.

allocstr reads input, and copies it into a new std::string , and prints &newstring to console.

reads input, and copies it into a new , and prints to console. printstr reads a pointer as hex text, and prints whatever std::string it finds there.

demo.mp4

Elevator pitch

... continue reading