execi.args.stack_high = minix_get_user_sp();
execi.args.stack_size = DEFAULT_STACK_LIMIT;
- fp->text_size = 0;
- fp->data_size = 0;
-
lookup_init(&resolve, fullpath, PATH_NOFLAGS, &execi.vmp, &execi.vp);
resolve.l_vmnt_lock = VMNT_READ;
/* Remember the new name of the process */
strlcpy(fp->fp_name, execi.args.progname, PROC_NAME_LEN);
- fp->text_size = execi.args.text_size;
- fp->data_size = execi.args.data_size;
pm_execfinal:
if(newfilp) unlock_filp(newfilp);
r_usage.ru_inblock = 0;
r_usage.ru_oublock = 0;
- r_usage.ru_ixrss = fp->text_size;
- r_usage.ru_idrss = fp->data_size;
- r_usage.ru_isrss = DEFAULT_STACK_LIMIT;
return sys_datacopy_wrapper(SELF, (vir_bytes) &r_usage, who_e,
m_in.m_lc_vfs_rusage.addr, (phys_bytes) sizeof(r_usage));
}
CHECK_NOT_ZERO_FIELD(r_usage1, ru_utime.tv_sec);
CHECK_NOT_ZERO_FIELD(r_usage1, ru_maxrss);
- CHECK_NOT_ZERO_FIELD(r_usage1, ru_ixrss);
- CHECK_NOT_ZERO_FIELD(r_usage1, ru_idrss);
- CHECK_NOT_ZERO_FIELD(r_usage1, ru_isrss);
if (getrusage(RUSAGE_CHILDREN, &r_usage2) != 0) {
e(1);
exit(1);
}
CHECK_NOT_ZERO_FIELD(r_usage2, ru_maxrss);
- CHECK_NOT_ZERO_FIELD(r_usage2, ru_ixrss);
- CHECK_NOT_ZERO_FIELD(r_usage2, ru_idrss);
- CHECK_NOT_ZERO_FIELD(r_usage2, ru_isrss);
- CHECK_EQUAL_FIELD(r_usage1, r_usage2, ru_ixrss);
- CHECK_EQUAL_FIELD(r_usage1, r_usage2, ru_idrss);
- CHECK_EQUAL_FIELD(r_usage1, r_usage2, ru_isrss);
if ((child = fork()) == 0) {
/*
* We cannot do this part of the test in the parent, since
}
CHECK_NOT_ZERO_FIELD(r_usage3, ru_utime.tv_sec);
CHECK_NOT_ZERO_FIELD(r_usage3, ru_maxrss);
- CHECK_NOT_ZERO_FIELD(r_usage3, ru_ixrss);
- CHECK_NOT_ZERO_FIELD(r_usage3, ru_idrss);
- CHECK_NOT_ZERO_FIELD(r_usage3, ru_isrss);
- CHECK_EQUAL_FIELD(r_usage1, r_usage3, ru_ixrss);
- CHECK_EQUAL_FIELD(r_usage1, r_usage3, ru_idrss);
- CHECK_EQUAL_FIELD(r_usage1, r_usage3, ru_isrss);
}
quit();
put_value(proc, "ru_inblock", "%ld", buf.ru_inblock);
put_value(proc, "ru_oublock", "%ld", buf.ru_oublock);
}
- if (verbose > 0) {
- put_value(proc, "ru_ixrss", "%ld", buf.ru_ixrss);
- put_value(proc, "ru_idrss", "%ld", buf.ru_idrss);
- put_value(proc, "ru_isrss", "%ld", buf.ru_isrss);
- }
put_close_struct(proc, verbose > 1);
}