FIXME: realloc in heap_insert()