Курсовая работа: Мониторинг виртуальной памяти в ОС Linux
static void __exit exit(void)
{
release_mmfault();
restore_syscalls();
fini_events();
fini_watch_pids();
remove_proc_entry (PROCDIR, NULL);
}
module_exit(exit);
/*** Module info ***/
MODULE_LICENSE («GPL»);
MODULE_AUTHOR («Ivan Korotkov»);
MODULE_DESCRIPTION («Linux Virtual Memory Monitor»);
events.h
/*
* Events ringbuffer.
*/
#ifndef MEMMON_EVENTS_H
#define MEMMON_EVENTS_H
/* Filename in procfs directory */
#define EVENTS_ENTRY «events»
/* Types of events */
enum memmon_event_type
{
NOTUSED = 0, /* to prevent treating zero-filled region as event struct */
MMAP2,
MUNMAP,
MREMAP,
MLOCK,