The Blockhandler and the Bitfield Package

Abstract Low-level memory management and data access for the computer algebra system Cayley are provided by two subroutine packages. The Blockhandler supports dynamic allocation, deletion and resizing of blocks of memory, with compacting garbage collection and indirect reference via “handles” to prevent fragmentation and permit workspace saving and restoration. The Bitfield Package is a well-specified set of routines for providing access to packed data. The paper discusses the packages' capabilities, programming interface, and implementation in C.