Home
last modified time | relevance | path

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

/DragonOS-0.1.7/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.7/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.h6 extern int mmio_release(int vaddr, int length);
Dmmio_buddy.rs558 pub fn release_mmio(&self, vaddr: u64, length: u64) -> Result<i32, SystemError> { in release_mmio()
561 mm_unmap(&mut initial_mm, vaddr, length, false); in release_mmio()
565 if loop_i >= length { in release_mmio()
719 pub extern "C" fn mmio_release(vaddr: u64, length: u64) -> i32 { in mmio_release()
720 if let Err(err) = MMIO_POOL.release_mmio(vaddr, length) { in mmio_release()
/DragonOS-0.1.7/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.7/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 …]
Dvec_cursor.rs25 pub fn zerod(length: usize) -> Self { in zerod()
30 result.data.resize(length, 0); in zerod()
/DragonOS-0.1.7/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.7/kernel/src/driver/virtio/
Dtransport_pci.rs131 length: PciArch::read_config( in new()
372 length: u32, field
470 if struct_info.offset + struct_info.length > bar_size in get_bar_region()
471 || size_of::<T>() > struct_info.length as usize in get_bar_region()
502 struct_info.length as usize / size_of::<T>(), in get_bar_region_slice()
/DragonOS-0.1.7/kernel/src/driver/usb/
Dusb.h148 uint16_t length; member
255 pak_name.length = (_transfer_length);
/DragonOS-0.1.7/kernel/src/driver/interrupt/apic/
Dapic.c67 while (header->length > 2) in apic_io_apic_init()
78 ent += header->length; in apic_io_apic_init()
604 while (header->length > 2) in apic_get_ics()
612 ent += header->length; in apic_get_ics()
/DragonOS-0.1.7/docs/kernel/memory_management/
Dmmio.md189 | mmio_release(vaddr, length) | 取消地址为vaddr,大小为length的mmio的映射并将其归还到buddy中 |
/DragonOS-0.1.7/kernel/src/driver/usb/xhci/
Dxhci.c60 … const uint8_t desc_index, const uint16_t lang_id, const uint16_t length);
1074 trb.wLength = packet->length; in xhci_setup_stage()
1250 if (packet->length) in xhci_control_in()
1252 data_buf_vaddr = (uint64_t)kzalloc(packet->length, 0); in xhci_control_in()
1254 packet->length, XHCI_DIR_IN_BIT, max_packet, status_buf_vaddr); in xhci_control_in()
1287 if (packet->length) in xhci_control_in()
1288 memcpy(target, (void *)data_buf_vaddr, packet->length); in xhci_control_in()
1289 retval = packet->length; in xhci_control_in()
1298 if (packet->length) in xhci_control_in()
1323 if (packet->length) in xhci_control_out()
[all …]
/DragonOS-0.1.7/kernel/src/driver/acpi/
Dacpi.h118 unsigned char length; member