sortix-mirror/kernel/include/sortix/memusage.h

38 lines
1.5 KiB
C

/*
* Copyright (c) 2022 Jonas 'Sortie' Termansen.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* sortix/memusage.h
* Memory usage statistics.
*/
#ifndef _INCLUDE_SORTIX_MEMUSAGE_H
#define _INCLUDE_SORTIX_MEMUSAGE_H
#define MEMUSAGE_TOTAL 0
#define MEMUSAGE_USED 1
#define MEMUSAGE_PURPOSE_FIRST 16
#define MEMUSAGE_PURPOSE_PHYSICAL (MEMUSAGE_PURPOSE_FIRST + 0)
#define MEMUSAGE_PURPOSE_PAGING (MEMUSAGE_PURPOSE_FIRST + 1)
#define MEMUSAGE_PURPOSE_KERNEL (MEMUSAGE_PURPOSE_FIRST + 2)
#define MEMUSAGE_PURPOSE_FILESYSTEM (MEMUSAGE_PURPOSE_FIRST + 3)
#define MEMUSAGE_PURPOSE_USERSPACE (MEMUSAGE_PURPOSE_FIRST + 4)
#define MEMUSAGE_PURPOSE_EXECVE (MEMUSAGE_PURPOSE_FIRST + 5)
#define MEMUSAGE_PURPOSE_DRIVER (MEMUSAGE_PURPOSE_FIRST + 6)
#define MEMUSAGE_PURPOSE_NETWORK (MEMUSAGE_PURPOSE_FIRST + 7)
#define MEMUSAGE_PURPOSE_LAST MEMUSAGE_PURPOSE_NETWORK
#endif