Lines Matching refs:allocsize
794 int allocsize;
820 allocsize = mapCtl.mapcmin - mapCtl.mapcfree; /* Figure out how much we need */
821 if(allocsize < 1) break; /* Leave if we have all we need */
826 allocsize = MAPPERBLOK; /* Show we allocated one block */
830 allocsize = (allocsize + MAPPERBLOK - 1) / MAPPERBLOK; /* Get the number of pages we need */
835 for(; allocsize > 0; allocsize >>= 1) { /* Try allocating in descending halves */
836 retr = kmem_alloc_wired(mapping_map, (vm_offset_t *)&mbn, PAGE_SIZE * allocsize); /* Find a virtual address to use */
837 if((retr != KERN_SUCCESS) && (allocsize == 1)) { /* Did we find any memory at all? */
843 allocsize = allocsize * MAPPERBLOK; /* Convert pages to number of maps allocated */
852 for(; allocsize > 0; allocsize -= MAPPERBLOK) { /* Release one block at a time */