Esempio n. 1
0
int main()
{
    struct item *dll = create_dll();
    fast_forward(&dll);
    ___sl_plot("03-ff-done");

    return 0;
}
Esempio n. 2
0
int main()
{
    struct item *dll = create_dll();
    __VERIFIER_plot("01-before-fast-forward");

    fast_forward(&dll);
    __VERIFIER_plot("02-after-fast-forward");

    return 0;
}
Esempio n. 3
0
File: lru_cache.c Progetto: pharic/c
int main() {
	dll *d = create_dll(5);
	hash *h = create_hash(10);
	req_page(d, h, 1);
	req_page(d, h, 2);
	req_page(d, h, 5);
	req_page(d, h, 1);
	printf("%d\n", d->head->data);
	printf("%d\n", d->head->next->data);
	printf("%d\n", d->head->next->next->data);
}
Esempio n. 4
0
Dllist* create_rd_data_struct()
{
	Dllist* dll_lnk = create_dll();

	for(int i=0; i<NB_VERTEX; i++)
	{
		int coords[2] = { randn( minX+margin, maxX-margin ), randn( minY+margin, maxY-margin ) };
		Vertex *new_vert = create_vert( coords );
		add_end_dll( dll_lnk, new_vert, STD );
	}
	dll_lnk->up2date[STD] = 1;
	return dll_lnk;
}
Esempio n. 5
0
struct master_item* create_sll_item(struct master_item *next) {
    struct master_item *pm = alloc_or_die_master();
    pm->next = next;
    pm->dll = create_dll();
    return pm;
}