source: cleaning up mem_heap.c, also rewriting implementation; added sys_assert macro in util_sys.c