[so] Tema 3 - probleme testare
Lucian Adrian Grijincu
lucian.grijincu at gmail.com
Sun May 11 01:06:21 EEST 2008
RTFS, ai acces la surse :)
static void test_ram_swap (size_t v_pages, size_t p_pages)
{
struct stat sbuf;
virt_pages = v_pages;
phys_pages = p_pages;
ram_fd = get_ram_fd ();
//// cer sistemului de operare informatii despre fisierul de ram
assert (fstat (ram_fd, &sbuf) == 0);
#if DEBUG >= NOTICE
printf ("ram size = %ld\n", sbuf.st_size);
#endif
//// testez daca fisierul de ram are dimensiunea PHYSICAL_PAGES*PAGE_SIZE
test ("ram_size", sbuf.st_size == p_sz * p_pages);
swap_fd = get_swap_fd ();
//// similar
assert (fstat (swap_fd, &sbuf) == 0);
#if DEBUG >= NOTICE
printf ("swap size = %ld\n", sbuf.st_size);
#endif
//// similar
test ("swap_size", sbuf.st_size == p_sz * v_pages);
}
2008/5/11 George Dita <george.dita at gmail.com>:
> Ce face testul ram_size si swap_size (pentru ca le pic). Si cred ca de acolo
> mi se trag mai multe chestii. Primesc segmentaion fault in tester cand se
> incearca ram_clean.
> --
> George Dita
> _______________________________________________
> so mailing list
> so at cursuri.cs.pub.ro
> http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/so
>
>
--
Lucian
More information about the so
mailing list