Lines Matching refs:i

229         for (int i = 0; i < slab_obj_ptr->bmp_count; ++i)  in slab_malloc()  local
232 if (*(slab_obj_ptr->bmp + (i >> 6)) == 0xffffffffffffffffUL) in slab_malloc()
234 i += 63; in slab_malloc()
239 tmp_md = i % 64; in slab_malloc()
240 if ((*(slab_obj_ptr->bmp + (i >> 6)) & (1UL << tmp_md)) == 0) in slab_malloc()
243 *(slab_obj_ptr->bmp + (i >> 6)) |= (1UL << tmp_md); in slab_malloc()
255 … return slab_pool->constructor((char *)slab_obj_ptr->vaddr + slab_pool->size * i, arg); in slab_malloc()
259 return (void *)((char *)slab_obj_ptr->vaddr + slab_pool->size * i); in slab_malloc()
351 for (int i = 0; i < 16; ++i) in slab_init() local
354 spin_init(&kmalloc_cache_group[i].lock); in slab_init()
356 …kmalloc_cache_group[i].cache_pool_entry = (struct slab_obj *)memory_management_struct.end_of_struc… in slab_init()
360 list_init(&kmalloc_cache_group[i].cache_pool_entry->list); in slab_init()
363 kmalloc_cache_group[i].cache_pool_entry->count_using = 0; in slab_init()
364 … kmalloc_cache_group[i].cache_pool_entry->count_free = PAGE_2M_SIZE / kmalloc_cache_group[i].size; in slab_init()
365 …kmalloc_cache_group[i].cache_pool_entry->bmp_len = (((kmalloc_cache_group[i].cache_pool_entry->cou… in slab_init()
366 …kmalloc_cache_group[i].cache_pool_entry->bmp_count = kmalloc_cache_group[i].cache_pool_entry->coun… in slab_init()
369 kmalloc_cache_group[i].cache_pool_entry->bmp = (ul *)memory_management_struct.end_of_struct; in slab_init()
372 …_struct = (ul)(memory_management_struct.end_of_struct + kmalloc_cache_group[i].cache_pool_entry->b… in slab_init()
375 …memset(kmalloc_cache_group[i].cache_pool_entry->bmp, 0xff, kmalloc_cache_group[i].cache_pool_entry… in slab_init()
376 for (int j = 0; j < kmalloc_cache_group[i].cache_pool_entry->bmp_count; ++j) in slab_init()
377 *(kmalloc_cache_group[i].cache_pool_entry->bmp + (j >> 6)) ^= 1UL << (j % 64); in slab_init()
379 kmalloc_cache_group[i].count_total_using = 0; in slab_init()
380 … kmalloc_cache_group[i].count_total_free = kmalloc_cache_group[i].cache_pool_entry->count_free; in slab_init()
390 for (int i = PAGE_2M_ALIGN(virt_2_phys(tmp_addr)) >> PAGE_2M_SHIFT; i <= tmp_page_mms_end; ++i) in slab_init() local
393 page = memory_management_struct.pages_struct + i; in slab_init()
405 for (int i = 0; i < 16; ++i) in slab_init() local
408 …virt = (ul *)((memory_management_struct.end_of_struct + PAGE_2M_SIZE * i + PAGE_2M_SIZE - 1) & PAG… in slab_init()
421 kmalloc_cache_group[i].cache_pool_entry->page = page; in slab_init()
423 kmalloc_cache_group[i].cache_pool_entry->vaddr = virt; in slab_init()
486 for (int i = 0; i < slab_obj_ptr->bmp_count; ++i) in kmalloc_create_slab_obj() local
487 *(slab_obj_ptr->bmp + (i >> 6)) ^= 1UL << (i % 64); in kmalloc_create_slab_obj()
515 for (int i = 0; i < slab_obj_ptr->bmp_count; ++i) in kmalloc_create_slab_obj() local
516 *(slab_obj_ptr->bmp + (i >> 6)) ^= 1UL << (i % 64); in kmalloc_create_slab_obj()
549 for (int i = 0; i < 16; ++i) in kmalloc() local
551 if (kmalloc_cache_group[i].size >= size) in kmalloc()
553 index = i; in kmalloc()
591 for (int i = 0; i < slab_obj_ptr->bmp_count; ++i) in kmalloc() local
595 if (*(slab_obj_ptr->bmp + (i >> 6)) == 0xffffffffffffffffUL) in kmalloc()
597 i += 63; in kmalloc()
600 md = i % 64; in kmalloc()
602 if ((*(slab_obj_ptr->bmp + (i >> 6)) & (1UL << md)) == 0) in kmalloc()
604 *(slab_obj_ptr->bmp + (i >> 6)) |= (1UL << md); in kmalloc()
613 result = (void *)((char *)slab_obj_ptr->vaddr + kmalloc_cache_group[index].size * i); in kmalloc()
645 for (int i = 0; i < 16; ++i) in kfree() local
647 slab_obj_ptr = kmalloc_cache_group[i].cache_pool_entry; in kfree()
659 spin_lock(&kmalloc_cache_group[i].lock); in kfree()
661 index = (address - slab_obj_ptr->vaddr) / kmalloc_cache_group[i].size; in kfree()
668 ++kmalloc_cache_group[i].count_total_free; in kfree()
669 --kmalloc_cache_group[i].count_total_using; in kfree()
673 …sing == 0) && (kmalloc_cache_group[i].count_total_free >= ((slab_obj_ptr->bmp_count) << 1)) && (km… in kfree()
675 switch (kmalloc_cache_group[i].size) in kfree()
685 kmalloc_cache_group[i].count_total_free -= slab_obj_ptr->bmp_count; in kfree()
693 kmalloc_cache_group[i].count_total_free -= slab_obj_ptr->bmp_count; in kfree()
705 spin_unlock(&kmalloc_cache_group[i].lock); in kfree()
709 } while (slab_obj_ptr != kmalloc_cache_group[i].cache_pool_entry); in kfree()