vmem
kgrep_walk_vmem(uintptr_t addr, const vmem_t *vmem, kgrep_walk_data_t *kg)
if (strcmp(vmem->vm_name, "heap") != 0 &&
strcmp(vmem->vm_name, "heap32") != 0 &&
strcmp(vmem->vm_name, "heap_core") != 0 &&
strcmp(vmem->vm_name, "heap_lp") != 0)
if (strcmp(vmem->vm_name, "heap_lp") == 0)
{ "vmem", "?", "print a vmem_t", vmem },
whatis_walk_vmem(uintptr_t addr, const vmem_t *vmem, whatis_info_t *wi)
const char *nm = vmem->vm_name;
int identifier = ((vmem->vm_cflags & VMC_IDENTIFIER) != 0);
wi->wi_vmem = vmem;
extern int vmem(uintptr_t, uint_t, int, const mdb_arg_t *);
leaky_vmem_interested(const vmem_t *vmem)
if (strcmp(vmem->vm_name, "kmem_oversize") != 0 &&
strcmp(vmem->vm_name, "static_alloc") != 0)
leaky_vmem(uintptr_t addr, const vmem_t *vmem, leak_mtab_t **lmp)
if (!leaky_vmem_interested(vmem))
leaky_estimate_vmem(uintptr_t addr, const vmem_t *vmem, size_t *est)
if (!leaky_vmem_interested(vmem))
*est += (int)(vmem->vm_kstat.vk_alloc.value.ui64 -
vmem->vm_kstat.vk_free.value.ui64);
vmem_t vmem;
if (mdb_vread(&vmem, sizeof (vmem), (uintptr_t)c->cache_arena) == -1) {
if (strcmp(vmem.vm_name, "kmem_default") != 0 &&
strcmp(vmem.vm_name, "kmem_firewall") != 0 &&
strcmp(vmem.vm_name, "static") != 0)
typegraph_estimate_vmem(uintptr_t addr, const vmem_t *vmem, size_t *est)
if (strcmp(vmem->vm_name, "kmem_oversize") != 0)
*est += (size_t)(vmem->vm_kstat.vk_alloc.value.ui64 -
vmem->vm_kstat.vk_free.value.ui64);
typegraph_vmem(uintptr_t addr, const vmem_t *vmem, tg_node_t **tgp)
if (strcmp(vmem->vm_name, "kmem_oversize") != 0)
vmem_t vmem;
if (mdb_vread(&vmem, sizeof (vmem), (uintptr_t)c->cache_arena) == -1) {
if (strcmp(vmem.vm_name, "kmem_default") != 0 &&
strcmp(vmem.vm_name, "kmem_firewall") != 0)
leaky_vmem(uintptr_t addr, const vmem_t *vmem, leak_mtab_t **lmp)
if (strcmp(vmem->vm_name, "umem_oversize") != 0 &&
strcmp(vmem->vm_name, "umem_memalign") != 0)
mdb_warn("can't walk vmem_alloc for %s (%p)", vmem->vm_name,
leaky_estimate_vmem(uintptr_t addr, const vmem_t *vmem, size_t *est)
if (strcmp(vmem->vm_name, "umem_oversize") != 0 &&
strcmp(vmem->vm_name, "umem_memalign") != 0)
*est += (int)(vmem->vm_kstat.vk_alloc - vmem->vm_kstat.vk_free);
vmem_t vmem;
for (vm_next = heap_arena; vm_next != NULL; vm_next = vmem.vm_source) {
if (mdb_vread(&vmem, sizeof (vmem), (uintptr_t)vm_next) == -1) {
vmem_t vmem;
if (mdb_vread(&vmem, sizeof (vmem), (uintptr_t)c->cache_arena) == -1) {
if (strcmp(vmem.vm_name, "umem_default") != 0 &&
strcmp(vmem.vm_name, "umem_firewall") != 0) {
c->cache_name, vmem.vm_name));
{ "vmem", "?", "print a vmem_t", vmem },
whatis_walk_vmem(uintptr_t addr, const vmem_t *vmem, whatis_info_t *wi)
const char *nm = vmem->vm_name;
wi->wi_vmem = vmem;
extern int vmem(uintptr_t, uint_t, int, const mdb_arg_t *);
vmem_qcache_reap(struct vmem *vmp)
mb_put_mem(mbchain_t *mbp, const void *vmem, int size, int type)
src = vmem;
md_get_mem(mdchain_t *mbp, void *vmem, int size, int type)
char *dst = vmem;
smb_mbc_put_mem(mbuf_chain_t *mbc, void *vmem, int mem_len)
caddr_t mem = vmem;
struct i40e_virt_mem vmem;
ret_code = i40e_allocate_virt_mem(hw, &vmem,
data = (u16 *)vmem.va;
i40e_free_virt_mem(hw, &vmem);
void *vmem;
vmem = ixgbe_calloc(hw, words, sizeof(u16));
if (!vmem)
data_local = (__le16 *)vmem;
ixgbe_free(hw, vmem, words * sizeof(u16));
void *vmem;
vmem = ixgbe_calloc(hw, IXGBE_SR_SECTOR_SIZE_IN_WORDS, sizeof(u16));
if (!vmem)
data = (u16 *)vmem;
ixgbe_free(hw, vmem, IXGBE_SR_SECTOR_SIZE_IN_WORDS * sizeof(u16));
spgcnt_t vmem = btop(vmem_size(heap_arena, VMEM_FREE));
return ((size_t)ptob(MAX(MIN(pmem, vmem), 0)));
typedef struct vmem vmem_t;