Хабр Курсы для всех
РЕКЛАМА
Практикум, Хекслет, SkyPro, авторские курсы — собрали всех и попросили скидки. Осталось выбрать!
#include "apue.h"
mmap@
вместо mmap(0
statbuf.st.size
→ statbuf.st_size
(в трёх местах)SEEK.SET
→ SEEK_SET
Поясните, пожалуйста, что имеется ввиду.
Если я вызываю read(), происходит вызов ядра. И если я делаю x = *p, где p — указатель на непрогруженную страницу, происходит исключение и вызов ядра.
RUSAGE_CHILDREN
Return resource usage statistics for all children of the calling process that have terminated and been waited for. These statistics will include the resources used by grandchildren, and further removed descendants, if all of the intervening descendants waited on their terminated children.
The structure definition shown at the start of this page was taken from 4.3BSD Reno. Not all fields are meaningful under Linux. In Linux 2.4 only the fields ru_utime, ru_stime, ru_minflt, and ru_majflt are maintained. Since Linux 2.6, ru_nvcsw and ru_nivcsw are also maintained.
Getrusage() returns information describing the resources utilized by the current process, or all its terminated child processes.
Первый аргумент — желаемый адрес начала участка отбраженной памяти. Не знаю, когда это может пригодится.
Замерял с помощью quantify скорость работы программы, которая буферизировано копирует большой файл размером 500 мб в другой файл.
Что есть quantify?
Файлы, отображаемые в память