Lines Matching defs:klw
1797 kmem_log_walk_t *klw;
1815 klw = mdb_zalloc(sizeof (kmem_log_walk_t), UM_SLEEP);
1816 lhp = &klw->klw_lh;
1820 mdb_free(klw, sizeof (kmem_log_walk_t));
1824 klw->klw_size = lhp->lh_chunksize * lhp->lh_nchunks;
1825 klw->klw_base = mdb_alloc(klw->klw_size, UM_SLEEP);
1828 if (mdb_vread(klw->klw_base, klw->klw_size,
1831 mdb_free(klw->klw_base, klw->klw_size);
1832 mdb_free(klw, sizeof (kmem_log_walk_t));
1836 klw->klw_sorted = mdb_alloc(maxndx * lhp->lh_nchunks *
1841 ((uintptr_t)klw->klw_base + i * lhp->lh_chunksize);
1844 klw->klw_sorted[k++] = &chunk[j];
1847 qsort(klw->klw_sorted, k, sizeof (kmem_bufctl_audit_t *),
1850 klw->klw_maxndx = k;
1851 wsp->walk_data = klw;
1859 kmem_log_walk_t *klw = wsp->walk_data;
1862 if (klw->klw_ndx == klw->klw_maxndx)
1865 bcp = klw->klw_sorted[klw->klw_ndx++];
1867 return (wsp->walk_callback((uintptr_t)bcp - (uintptr_t)klw->klw_base +
1868 (uintptr_t)klw->klw_lh.lh_base, bcp, wsp->walk_cbdata));
1874 kmem_log_walk_t *klw = wsp->walk_data;
1876 mdb_free(klw->klw_base, klw->klw_size);
1877 mdb_free(klw->klw_sorted, klw->klw_maxndx *
1879 mdb_free(klw, sizeof (kmem_log_walk_t));