Home
last modified time | relevance | path

Searched refs:length (Results 1 – 11 of 11) sorted by relevance

/DragonOS-0.1.3/user/libs/libc/src/
Dmalloc.c32 uint64_t length; // 整个块所占用的内存区域的大小 member
82 if (ptr->length == size) in malloc_query_free_chunk_bf()
88 if (ptr->length > size) in malloc_query_free_chunk_bf()
92 else if (best->length > ptr->length) in malloc_query_free_chunk_bf()
115 if (ptr->length >= size) in malloc_query_free_chunk_ff()
159 new_ck->length = brk_max_addr - brk_managed_addr; in malloc_enlarge()
182 if (((uint64_t)(ptr->prev) + ptr->prev->length == (uint64_t)ptr)) in malloc_merge_free_chunk()
186 ptr->prev->length += ptr->length; in malloc_merge_free_chunk()
328 if ((int64_t)(ck->length) - size > sizeof(malloc_mem_chunk_t)) in malloc()
332 new_ck->length = ck->length - size; in malloc()
[all …]
/DragonOS-0.1.3/kernel/src/mm/
Dmmap.c27 static void mm_calculate_entry_num(uint64_t length, mm_pgt_entry_num_t *ent) in mm_calculate_entry_num() argument
31 ent->num_PML4E = (length + (1UL << PAGE_GDT_SHIFT) - 1) >> PAGE_GDT_SHIFT; in mm_calculate_entry_num()
32 ent->num_PDPTE = (length + PAGE_1G_SIZE - 1) >> PAGE_1G_SHIFT; in mm_calculate_entry_num()
33 ent->num_PDE = (length + PAGE_2M_SIZE - 1) >> PAGE_2M_SHIFT; in mm_calculate_entry_num()
34 ent->num_PTE = (length + PAGE_4K_SIZE - 1) >> PAGE_4K_SHIFT; in mm_calculate_entry_num()
46 int mm_map_phys_addr(ul virt_addr_start, ul phys_addr_start, ul length, ul flags, bool use4k) in mm_map_phys_addr() argument
50 …return mm_map_proc_page_table(global_CR3, true, virt_addr_start, phys_addr_start, length, flags, f… in mm_map_phys_addr()
53 int mm_map_phys_addr_user(ul virt_addr_start, ul phys_addr_start, ul length, ul flags) in mm_map_phys_addr_user() argument
56 …return mm_map_proc_page_table(global_CR3, true, virt_addr_start, phys_addr_start, length, flags, t… in mm_map_phys_addr_user()
71 …age_table_addr, bool is_phys, ul virt_addr_start, ul phys_addr_start, ul length, ul flags, bool us… in mm_map_proc_page_table() argument
[all …]
Dmm.h407 int mm_map_phys_addr(ul virt_addr_start, ul phys_addr_start, ul length, ul flags, bool use4k);
421 …age_table(ul proc_page_table_addr, bool is_phys, ul virt_addr_start, ul phys_addr_start, ul length,
424 int mm_map_phys_addr_user(ul virt_addr_start, ul phys_addr_start, ul length, ul flags);
434 void mm_unmap_proc_table(ul proc_page_table_addr, bool is_phys, ul virt_addr_start, ul length);
442 #define mm_unmap_addr(virt_addr, length) ({ mm_unmap_proc_table((uint64_t)get_CR3(), true, virt_add… argument
455 int mm_create_vma(struct mm_struct *mm, uint64_t vaddr, uint64_t length, vm_flags_t vm_flags,
467 int mm_map_vma(struct vm_area_struct *vma, uint64_t paddr, uint64_t offset, uint64_t length);
478 int mm_map(struct mm_struct *mm, uint64_t vaddr, uint64_t length, uint64_t paddr);
499 int mm_unmap(struct mm_struct *mm, uint64_t vaddr, uint64_t length, bool destroy);
Dmmio.c82 int mmio_release(uint64_t vaddr, uint64_t length) in mmio_release() argument
86 mm_unmap(&initial_mm, vaddr, length, false); in mmio_release()
89 for (uint64_t i = 0; i < length;) in mmio_release()
/DragonOS-0.1.3/docs/kernel/core_api/
Dmm-api.md126 ### `int mm_map_phys_addr(ul virt_addr_start, ul phys_addr_start, ul length, ul flags, bool use4k)`
142 **length**
154 …age_table_addr, bool is_phys, ul virt_addr_start, ul phys_addr_start, ul length, ul flags, bool us… argument
178 **length**
203 ### `void mm_unmap_proc_table(ul proc_page_table_addr, bool is_phys, ul virt_addr_start, ul length)` argument
223 **length**
227 ### `mm_unmap_addr(virt_addr, length)`
239 **length**
/DragonOS-0.1.3/kernel/src/libs/
Dlz4.c2188 U32 length = 0; in read_variable_length() local
2193 return length; in read_variable_length()
2199 length += s; in read_variable_length()
2203 return length; in read_variable_length()
2207 return length; in read_variable_length()
2256 size_t length; in LZ4_decompress_generic() local
2296 length = token >> ML_BITS; /* literal length */ in LZ4_decompress_generic()
2301 if (length == RUN_MASK) in LZ4_decompress_generic()
2304length += read_variable_length(&ip, iend - RUN_MASK, (int)endOnInput, (int)endOnInput, &error); in LZ4_decompress_generic()
2309 if ((safeDecode) && unlikely((uptrval)(op) + length < (uptrval)(op))) in LZ4_decompress_generic()
[all …]
/DragonOS-0.1.3/kernel/src/common/
Dglib.h201 bool verify_area(uint64_t addr_start, uint64_t length) in verify_area() argument
203 if ((addr_start + length) <= 0x00007fffffffffffUL) // 用户程序可用的的地址空间应<= 0x00007fffffffffffUL in verify_area()
/DragonOS-0.1.3/kernel/src/driver/usb/
Dusb.h148 uint16_t length; member
255 pak_name.length = (_transfer_length);
/DragonOS-0.1.3/kernel/src/driver/interrupt/apic/
Dapic.c66 while (header->length > 2) in apic_io_apic_init()
77 ent += header->length; in apic_io_apic_init()
596 while (header->length > 2) in apic_get_ics()
604 ent += header->length; in apic_get_ics()
/DragonOS-0.1.3/kernel/src/driver/acpi/
Dacpi.h118 unsigned char length; member
/DragonOS-0.1.3/kernel/src/driver/usb/xhci/
Dxhci.c60 … const uint8_t desc_index, const uint16_t lang_id, const uint16_t length);
1072 trb.wLength = packet->length; in xhci_setup_stage()
1248 if (packet->length) in xhci_control_in()
1250 data_buf_vaddr = (uint64_t)kzalloc(packet->length, 0); in xhci_control_in()
1252 packet->length, XHCI_DIR_IN_BIT, max_packet, status_buf_vaddr); in xhci_control_in()
1285 if (packet->length) in xhci_control_in()
1286 memcpy(target, (void *)data_buf_vaddr, packet->length); in xhci_control_in()
1287 retval = packet->length; in xhci_control_in()
1296 if (packet->length) in xhci_control_in()
1321 if (packet->length) in xhci_control_out()
[all …]