liballocs: meta-level services within Unix processes

liballocs is a system which adds an expressive meta-level to Unix processes. You can perform queries on arbitrary pointers, benefit from whole-process run-time type information, observe the allocation structure in your program, and more. It consists of a run-time library and some toolchain extensions. Currently the latter mostly work for C, though other languages are fair game with appropriate retrofitting. The core abstraction of liballocs is typed allocations, which I believe is general enough to translate to any source language and most vaguely sane implementations thereof.

Read more in the Onward! 2015 paper: here.

What does liballocs do?

The easiest way to use liballocs is to compile with allocscc which invokes the host toolchain's C compiler and linker, but with additional pre- and post-processing. The most significant preprocessing is postprocessing the debugging information into an efficient run-time representation. Once built, the binary may be run with or without liballocs loaded.

$ allocscc -o myprog ...           # + other front-ends
$ ./myprog                         # metalevel stubbed out
$ LD_PRELOAD=liballocs.so ./myprog # metalevel enabled 

Building and installing

Currently, liballocs is only for x86-64 GNU/Linux systems (although ports are welcome and very feasible). For code and build instructions, please see the GitHub page.

Contact

Please do send me e-mail if you have questions or comments.

Acknowledgments

This work has been supported by EPSRC Programme Grant EP/K008528/1, REMS: Rigorous Engineering of Mainstream Systems.

A preliminary version was created with funding from the Oxford Martin School Institute for the Future of Computing.

Content updated at Tue 14 Feb 16:19:00 GMT 2017.
validate this page