Searched refs:kzalloc (Results 1 – 17 of 17) sorted by relevance
/DragonOS-0.1.5/kernel/src/libs/ |
D | wait_queue.c | 26 wait_queue_node_t *wait = (wait_queue_node_t *)kzalloc(sizeof(wait_queue_node_t), 0); in wait_queue_sleep_on() 42 wait_queue_node_t *wait = (wait_queue_node_t *)kzalloc(sizeof(wait_queue_node_t), 0); in wait_queue_sleep_on_unlock() 57 wait_queue_node_t *wait = (wait_queue_node_t *)kzalloc(sizeof(wait_queue_node_t), 0); in wait_queue_sleep_on_interriptible()
|
D | mutex.c | 41 …struct mutex_waiter_t *waiter = (struct mutex_waiter_t *)kzalloc(sizeof(struct mutex_waiter_t), 0); in mutex_lock()
|
D | idr.c | 101 new_one = kzalloc(sizeof(struct idr_layer), gfp_mask); // 默认清空? in idr_preload() 850 bitmap = kzalloc(sizeof(struct ida_bitmap), gfp_mask); in ida_preload()
|
D | lz4.c | 206 #define ALLOC_AND_ZERO(s) kzalloc(s, 0)
|
/DragonOS-0.1.5/kernel/src/sched/ |
D | completion.c | 279 struct completion *one_to_one = kzalloc(sizeof(struct completion) * N, 0); in __test_completion() 280 struct completion *one_to_many = kzalloc(sizeof(struct completion), 0); in __test_completion() 281 struct completion *waiter_many_to_one = kzalloc(sizeof(struct completion) * N, 0); in __test_completion() 282 struct completion *worker_many_to_one = kzalloc(sizeof(struct completion) * N, 0); in __test_completion() 283 struct __test_data *waiter_data = kzalloc(sizeof(struct __test_data) * N, 0); in __test_completion() 284 struct __test_data *worker_data = kzalloc(sizeof(struct __test_data) * N, 0); in __test_completion() 335 struct completion *cmpl = kzalloc(sizeof(struct completion), 0); in completion_alloc()
|
/DragonOS-0.1.5/kernel/src/common/ |
D | wait_queue.h | 69 wait_queue_node_t *wait = (wait_queue_node_t *)kzalloc(sizeof(wait_queue_node_t), 0); \ 73 wait_queue_node_t *wait = (wait_queue_node_t *)kzalloc(sizeof(wait_queue_node_t), 0); \
|
/DragonOS-0.1.5/docs/kernel/core_api/ |
D | allocate-memory.md | 7 …()`函数进行分配。并且,出于安全起见,除非内存在分配后一定会被覆盖,且您能确保内存中的脏数据一定不会对程序造成影响,在其余情况下,我们建议使用`kzalloc()`进行内存分配,它将会在`kma…
|
D | mm-api.md | 27 ### `void *kzalloc(unsigned long size, gfp_t gfp)` 52   请不要通过这个函数释放那些不是从`kmalloc()`或`kzalloc()`申请的内存,否则将会导致系统崩溃。
|
/DragonOS-0.1.5/kernel/src/process/ |
D | kthread.c | 54 struct kthread_create_info_t *create = kzalloc(sizeof(struct kthread_create_info_t), 0); in __kthread_create_on_node() 95 char *full_name = kzalloc(1024, 0); in __kthread_create_on_node() 298 struct kthread_info_t *kt = kzalloc(sizeof(struct kthread_info_t), 0); in kthread_set_worker_private()
|
D | process.c | 168 void *buf = kzalloc(PAGE_4K_SIZE, 0); in process_load_elf_file() 337 void *buf3 = kzalloc(PAGE_4K_SIZE, 0); in process_load_elf_file()
|
D | fork.c | 40 tsk = (struct process_control_block *)kzalloc(STACK_SIZE, 0); in do_fork()
|
/DragonOS-0.1.5/kernel/src/mm/ |
D | slab.h | 69 static __always_inline void *kzalloc(size_t size, gfp_t gfp) in kzalloc() function
|
D | mm.c | 680 struct Page *p = (struct Page *)kzalloc(sizeof(struct Page), 0); in __create_mmio_page_struct()
|
/DragonOS-0.1.5/docs/kernel/sched/ |
D | c_waiting.md | 99 | DECLARE_WAIT_ALLOC(name, pcb) | 使用`kzalloc`声明一个wait_queue节点,同时把pcb所代表的进程与该节点绑定,请记得使用kfree释放空间 | 100 | DECLARE_WAIT_ALLOC_SELF(name) | 使用`kzalloc`声明一个wait_queue节点,同时当前进程(即自身进程)与该节点绑定,请记得使用kfree释放…
|
/DragonOS-0.1.5/kernel/src/ |
D | main.c | 102 uchar *ptr = (uchar *)kzalloc(STACK_SIZE, 0) + STACK_SIZE; in system_initialize()
|
/DragonOS-0.1.5/kernel/src/driver/usb/xhci/ |
D | xhci.c | 896 uint64_t device_context_vaddr = (uint64_t)kzalloc(xhci_hc[id].context_size * 32, 0); in xhci_initialize_slot() 1009 uint64_t input_ctx_buffer = (uint64_t)kzalloc(xhci_hc[id].context_size * 33, 0); in xhci_set_address() 1244 (uint64_t)kzalloc(16, 0); // 本来是要申请4bytes的buffer的,但是因为xhci控制器需要16bytes对齐,因此申请16bytes in xhci_control_in() 1252 data_buf_vaddr = (uint64_t)kzalloc(packet->length, 0); in xhci_control_in() 1316 uint64_t status_buf_vaddr = (uint64_t)kzalloc(16, 0); in xhci_control_out() 1325 data_buf_vaddr = (uint64_t)kzalloc(packet->length, 0); in xhci_control_out() 1736 uint64_t input_ctx_buffer = (uint64_t)kzalloc(xhci_hc[id].context_size * 33, 0); in xhci_configure_endpoint() 1812 full_conf = kzalloc(conf_desc.total_len, 0); in xhci_configure_port() 1856 void *hid_report_data = kzalloc(hid_desc->report_desc_len, 0); in xhci_configure_port() 2182 xhci_hc[cid].dcbaap_vaddr = (uint64_t)kzalloc(2048, 0); // 分配2KB的设备上下文地址数组空间 in xhci_init() [all …]
|
/DragonOS-0.1.5/kernel/src/driver/mouse/ |
D | ps2_mouse.c | 204 …ps2_mouse_buf_ptr = (struct ps2_mouse_input_buffer *)kzalloc(sizeof(struct ps2_mouse_input_buffer)… in ps2_mouse_init()
|