Lines Matching refs:needed
1027 /* Allocate audit structures if needed */
1787 mbuf_cslab_alloc(void *arg, mcache_obj_t ***plist, unsigned int needed,
1792 unsigned int num = 0, cnum = 0, want = needed;
1802 ASSERT(needed > 0);
1814 num = cslab_alloc(class, plist, needed);
1816 if (num == needed) {
1819 return (needed);
1829 needed -= num;
1842 needed = mcache_alloc_ext(m_cache(MC_MBUF), &mp_list, needed, wait);
1843 if (needed == 0) {
1853 needed = mcache_alloc_ext(cp, &clp_list, needed, wait);
1854 if (needed == 0) {
1858 needed = mcache_alloc_ext(ref_cache, &ref_list, needed, wait);
1859 if (needed == 0) {
1865 * By this time "needed" is MIN(mbuf, cluster, ref). Any left
1868 for (cnum = 0; cnum < needed; cnum++) {
2140 int needed;
2153 needed = numpages * 2 * NMBPCL;
2156 &con_list, needed, MCR_SLEEP);
2158 VERIFY(con_list != NULL && i == needed);
2160 needed = numpages;
2162 needed = numpages / (M16KCLBYTES / NBPG);
2166 (mcache_obj_t **)&mca_list, needed, MCR_SLEEP);
2168 VERIFY(mca_list != NULL && i == needed);
2325 * Remember total number of clusters needed
2341 * Remember total number of 4KB clusters needed
2357 * Remember total number of 16KB clusters needed
3052 unsigned int pnum, needed = *num_needed;
3090 needed = mcache_alloc_ext(cp, &mp_list, needed, mcflags);
3092 for (pnum = 0; pnum < needed; pnum++) {
3169 unsigned int needed, resid;
3245 needed = mcache_alloc_ext(cp, &mp_list,
3255 if (bufsize > MHLEN && (needed & 0x1))
3256 needed--;
3258 while (num < needed) {
3338 needed = *numlist;
3352 needed = mcache_alloc_ext(rcp, &rmp_list, *numlist, mcflags);
3354 if (needed == 0)
3372 needed = mcache_alloc_ext(cp, &mp_list, needed * nsegs, mcflags);
3375 needed = (needed / nsegs) * nsegs;
3376 if (needed == 0)
3387 needed += needed / nsegs;
3445 if (num == needed)
3902 int needed = 0;
3919 needed++;
3921 len -= MIN(len, (n->m_len - ((needed == 1) ? off : 0)));
3924 needed++;
3935 if (mcache_alloc_ext(m_cache(MC_MBUF), &list, needed,
3936 mcflags) != needed)
3939 needed = 0;
3961 needed++;
3999 mtype_stat_add(type, needed);
4000 mtype_stat_sub(MT_FREE, needed + 1);