heap_header and heap_footer functions