Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/kern_mbuf.c
Show First 20 Lines • Show All 1,618 Lines • ▼ Show 20 Lines | mb_alloc_ext_plus_pages(int len, int how) | ||||
m = mb_alloc_ext_pgs(how, mb_free_mext_pgs); | m = mb_alloc_ext_pgs(how, mb_free_mext_pgs); | ||||
if (m == NULL) | if (m == NULL) | ||||
return (NULL); | return (NULL); | ||||
m->m_epg_flags |= EPG_FLAG_ANON; | m->m_epg_flags |= EPG_FLAG_ANON; | ||||
npgs = howmany(len, PAGE_SIZE); | npgs = howmany(len, PAGE_SIZE); | ||||
for (i = 0; i < npgs; i++) { | for (i = 0; i < npgs; i++) { | ||||
do { | do { | ||||
pg = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | | pg = vm_page_alloc_noobj(VM_ALLOC_NORMAL | | ||||
VM_ALLOC_NOOBJ | VM_ALLOC_NODUMP | VM_ALLOC_WIRED); | VM_ALLOC_NODUMP | VM_ALLOC_WIRED); | ||||
if (pg == NULL) { | if (pg == NULL) { | ||||
if (how == M_NOWAIT) { | if (how == M_NOWAIT) { | ||||
m->m_epg_npgs = i; | m->m_epg_npgs = i; | ||||
m_free(m); | m_free(m); | ||||
return (NULL); | return (NULL); | ||||
} | } | ||||
vm_wait(NULL); | vm_wait(NULL); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 73 Lines • Show Last 20 Lines |