Home
last modified time | relevance | path

Searched refs:bmp (Results 1 – 5 of 5) sorted by relevance

/DragonOS-0.1.7/kernel/src/mm/
Dslab.c97 slab_pool->cache_pool_entry->bmp = (ul *)kmalloc(slab_pool->cache_pool_entry->bmp_len, 0); in slab_create()
100 if (slab_pool->cache_pool_entry->bmp == NULL) in slab_create()
109 memset(slab_pool->cache_pool_entry->bmp, 0, slab_pool->cache_pool_entry->bmp_len); in slab_create()
139 kfree(tmp_slab_obj->bmp); in slab_destroy()
148 kfree(slab_obj_ptr->bmp); in slab_destroy()
199 tmp_slab_obj->bmp = (ul *)kmalloc(tmp_slab_obj->bmp_len, 0); in slab_malloc()
202 if (tmp_slab_obj->bmp == NULL) in slab_malloc()
210 memset(tmp_slab_obj->bmp, 0, tmp_slab_obj->bmp_len); in slab_malloc()
232 if (*(slab_obj_ptr->bmp + (i >> 6)) == 0xffffffffffffffffUL) in slab_malloc()
240 if ((*(slab_obj_ptr->bmp + (i >> 6)) & (1UL << tmp_md)) == 0) in slab_malloc()
[all …]
Dmm.c107 …memory_management_struct.bmp = (unsigned long *)((memory_management_struct.start_brk + PAGE_4K_SIZ… in mm_init()
113 memset(memory_management_struct.bmp, 0xff, memory_management_struct.bmp_len); in mm_init()
117 …ct.pages_struct = (struct Page *)(((unsigned long)memory_management_struct.bmp + memory_management… in mm_init()
180 …*(memory_management_struct.bmp + ((p->addr_phys >> PAGE_2M_SHIFT) >> 6)) ^= (1UL << ((p->addr_phys… in mm_init()
220 *(memory_management_struct.bmp + (page_num >> 6)) |= (1UL << (page_num % 64)); in mm_init()
341 ul *p = memory_management_struct.bmp + (j >> 6); in alloc_pages()
358 …*(memory_management_struct.bmp + ((x->addr_phys >> PAGE_2M_SHIFT) >> 6)) |= (1UL << (x->addr_phys … in alloc_pages()
456 *(memory_management_struct.bmp + (page_num >> 6)) &= ~(1UL << (page_num % 64)); in free_pages()
605 ul *p = memory_management_struct.bmp + (j >> 6); in mm_find_page()
Dslab.h32 ul *bmp; member
Dmm-types.h52 ul *bmp; // 物理空间页映射位图 member
/DragonOS-0.1.7/kernel/src/libs/
Didr.c887 static int __get_id_from_bitmap(struct ida_bitmap *bmp) in __get_id_from_bitmap() argument
892 if (bmp->bitmap[ary_id] != IDR_FULL) in __get_id_from_bitmap()
894 int bmp_id = __lowbit_id(~bmp->bitmap[ary_id]); in __get_id_from_bitmap()
895 bmp->bitmap[ary_id] |= (1ull << bmp_id); in __get_id_from_bitmap()
896 bmp->count++; // 注意, 这里已经标记这一位已经使用, 同时更新了ida_count in __get_id_from_bitmap()
946 struct ida_bitmap *bmp = (struct ida_bitmap *)stk[0]->ary[layer_id]; in ida_alloc() local
947 int low_id = __get_id_from_bitmap(bmp); in ida_alloc()
953 __idr_mark_full(&ida_p->idr, idr_id, stk, (bmp->count == IDA_FULL ? 2 : 1)); in ida_alloc()
976 struct ida_bitmap *bmp = idr_find(&ida_p->idr, idr_id); in ida_count() local
977 if (NULL == bmp) in ida_count()
[all …]