Exemplo n.º 1
0
Arquivo: page.c Projeto: henryxlau/OS
static bool swap_load(uint8_t *kpage, struct page *p)
{
	load_swap(p->swap_index, kpage);
	free_swap(p->swap_index);

	return true;
}
Exemplo n.º 2
0
Arquivo: swap.c Projeto: xcw0579/mudOS
/*
 * 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;
}
Exemplo n.º 3
0
Arquivo: swap.c Projeto: xcw0579/mudOS
/*
 * 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;
}