#include #include #include #include main() { int i, res; struct swapent ent; struct swapent* ent_ptr; struct swaptable tb1; tb1.swt_n = 10; for (i=0; i<10; i++) { ent_ptr = malloc(sizeof(ent)); tb1.swt_ent[i] = *ent_ptr; tb1.swt_ent[i].ste_path = malloc(sizeof(char[MAXPATHLEN])); printf ("loc(swt_ent)=%p loc(path)=%p\n", &tb1.swt_ent[i], tb1.swt_ent[i].ste_path); } res = swapctl(SC_LIST, &tb1); if (res>=0) for (i=0; i