Abstract

This disclosure introduces XORCompactor, a novel, reversible, zero-copy memory defragmentation technique for operating systems. Unlike traditional memory movers such as memmove() or memcpy(), XORCompactor performs in-place compaction by leveraging a mathematical XOR-based transformation to swap and relocate memory segments without auxiliary buffers or double-copy overhead. This method ensures lossless reversibility, enabling safe rollback, debugging, and deterministic state recovery. The technique improves memory utilization, reduces fragmentation latency, and supports deterministic behavior in embedded and real-time systems.

XORCompactor includes the proposal of a new instruction-level operation, XOR_MOV, and outlines potential hardware integration for high-throughput memory management. The algorithm has been implemented and benchmarked in Rust, showing promising results across Linux, Windows, and FreeBSD. This defensive publication establishes XORCompactor and XOR_MOV as prior art, preventing future patenting attempts and securing the architecture for public research and non-commercial use.

Creative Commons License

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 4.0 License.

Share

COinS