Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../.././../../../../usr/include/vm/acct_impl.h
Real path: /usr/include/vm/acct_impl.h
Zurück
/* * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. */ #ifndef _VM_ACCT_IMPL_H #define _VM_ACCT_IMPL_H #include <vm/acct.h> #include <sys/sysmacros.h> #ifdef __cplusplus extern "C" { #endif #ifdef _KERNEL /* * Any updates to this enum need to be aligned with Memresv_kstat_data and * friends. Various static- and non-static ASSERTs will fail otherwise. * * All reservation types >= MRT_NVISIBLE (e.g. right now MRT_DR) are * publicly reported as part of MRT_KERNEL. We track them seperately * internally to double-check correctness issues. */ typedef enum memory_resv_type { MRT_KERNEL, /* non-DR kernel reservations */ MRT_USER, /* user memory reservations */ MRT_KZ, /* Kernel Zone reservations */ MRT_DR, /* Memory remove DR reservations */ #define MRT_NVISIBLE MRT_DR /* # of kstat-visible reservations */ MRT_COUNT /* MUST BE LAST */ } memory_resv_type_t; /* tracks memory usage for a given type */ typedef struct memory_resv { pgcnt_t mr_value; /* current amount */ uint64_t mr_add; /* exports */ uint64_t mr_sub; /* imports */ uint64_t mr_freed; /* non-credit tree frees */ uint64_t mr_import_failed; /* failed imports */ credit_t *mr_credit; /* for mdb: credit tree */ memory_resv_type_t mr_type; /* for mdb: array idx */ uint8_t mr_pad[P2NPHASE( sizeof (pgcnt_t) + 4 * sizeof (uint64_t) + sizeof (credit_t *) + sizeof (memory_resv_type_t), _FALSE_SHARING_ALIGN)]; } memory_resv_t; /* Global Memory accounting info */ typedef struct memory_acct { pgcnt_t mema_total; /* physinstalled */ pgcnt_t mema_availrmem_initial; /* copy of availrmem_initial */ pgcnt_t mema_availrmem; /* copy of availrmem */ pgcnt_t mema_kern_longterm; /* total long-term alloc'ed */ uint64_t mema_total_add; /* pages added to system */ uint64_t mema_total_sub; /* pages removed from system */ uint64_t mema_availrmem_add; /* exports to availrmem */ uint64_t mema_availrmem_sub; /* imports from availrmem */ uint64_t mema_availrmem_alloced; /* non-credit allocations */ uint64_t mema_availrmem_freed; /* non-credit frees */ uint64_t mema_kern_longterm_add; /* (add) */ uint64_t mema_kern_longterm_sub; /* (sub) */ uint64_t mema_pad[P2NPHASE( 4 * sizeof (pgcnt_t) + 8 * sizeof (uint64_t), _FALSE_SHARING_ALIGN) / sizeof (uint64_t)]; } memory_acct_t; #define MEMACCT_AVAILRMEM_INITIAL(total, longterm) \ ((pgcnt_t)(total) - MIN((pgcnt_t)(total), (pgcnt_t)(longterm))) #define MEMRESV_CRFLAGS(flags) \ (((flags) == MEMRESV_SNOOZE_TRYHARD) ? (CR_SNOOZE | CR_TRYHARD) : \ (((flags) == MEMRESV_TRYHARD) ? (CR_NOSLEEP | CR_TRYHARD) : \ CR_NOSLEEP)) #define MEMRESV_CHECKFLAGS(flags) \ ((flags) == MEMRESV_NORMAL || (flags) == MEMRESV_TRYHARD || \ (flags) == MEMRESV_SNOOZE_TRYHARD) /* ------------------------------------------------------------------ */ typedef struct memory_usage { pgcnt_t mu_value; /* current amount */ uint64_t mu_add; /* exports */ uint64_t mu_sub; /* imports */ uint64_t mu_import_failed; /* failed imports */ uint64_t mu_failed_sub; /* total failed subtractions */ credit_t *mu_credit; /* for mdb: credit tree */ memory_usage_type_t mu_type; /* for mdb: MUT_ value */ uint8_t mu_pad[P2NPHASE( sizeof (pgcnt_t) + 4 * sizeof (uint64_t) + sizeof (credit_t *) + sizeof (memory_usage_type_t), _FALSE_SHARING_ALIGN)]; } memory_usage_t; #endif /* _KERNEL */ #ifdef __cplusplus } #endif #endif /* _VM_ACCT_IMPL_H */