static bool swap_load(uint8_t *kpage, struct page *p) { load_swap(p->swap_index, kpage); free_swap(p->swap_index); return true; }
/* * Same as above, but to remove line_number swap space. */ void remove_line_swap(program_t * prog) { if (!prog->line_info) load_line_numbers(prog); if (prog->line_swap_index != -1 && prog->line_info) free_swap(prog->line_swap_index, prog->file_info[0]); prog->line_swap_index = -1; }
/* * Remove the swap space associated with this object. */ void remove_swap_file(object_t * ob) { if (!ob) return; /* may be swapped out, so swap in to get size, update stats, etc */ if (ob->flags & O_SWAPPED) load_ob_from_swap(ob); if (ob->prog) free_swap(ob->swap_num, ob->prog->total_size); ob->swap_num = -1; }