Some fundamental definitions.


§1. Build identity. This notation tangles out to the current build number as specified in the contents section of this web.

define PROGRAM_NAME "inblorb"

§2. Setting up the memory manager. We need to itemise the structures we'll want to allocate:

enumerate auxiliary_file_CLASS 
enumerate chunk_metadata_CLASS 
enumerate heading_CLASS 
enumerate placeholder_CLASS 
enumerate rdes_record_CLASS 
enumerate request_CLASS 
enumerate resource_number_CLASS 
enumerate segment_CLASS 
enumerate skein_node_CLASS 
enumerate table_CLASS 
enumerate template_CLASS 
enumerate template_path_CLASS 

§3. And then expand:

DECLARE_CLASS(auxiliary_file)
DECLARE_CLASS(skein_node)
DECLARE_CLASS(chunk_metadata)
DECLARE_CLASS(placeholder)
DECLARE_CLASS(heading)
DECLARE_CLASS(table)
DECLARE_CLASS(rdes_record)
DECLARE_CLASS(resource_number)
DECLARE_CLASS(segment)
DECLARE_CLASS(request)
DECLARE_CLASS(template)
DECLARE_CLASS(template_path)

§4. Simple allocations. Not all of our memory will be claimed in the form of structures: now and then we need to use the equivalent of traditional malloc and calloc routines.

enumerate RDES_MREASON 
enumerate CHUNK_STORAGE_MREASON 
void Basics::register_mreasons(void) {
    Memory::reason_name(RDES_MREASON, "resource descriptions");
    Memory::reason_name(CHUNK_STORAGE_MREASON, "chunk data storage");
}