The linux memory allocation method is based on the linux driver development and application development. when you want to allocate memory, you have to deal with a lot of memory allocation functions: malloc kmalloc vmalloc alloc_page dma_alloc... malloc: allocates user memory. physical continuity is not guaranteed. in linux, the user space and kernel space cannot directly access the memory. You must use copy_from_user copy_to_user or mmap to picture the memory. www.2cto.com kmalloc: the kernel space is divided into small memory (less than 128 kb, this value can be modified), physically consecutive. because the memory is relatively small, it is not directly obtained from buddy, but managed by slab. slab will get idle page from get_free_page and other methods in buddy, and then the small memory will be, kmem_cache_alloc and so on (kmalloc will call kmem_cache_alloc) are used to return the request to the memory. vmalloc: Memory allocated to the kernel space. This memory does not guarantee physical continuity, and the memory can be relatively large. It seems that there is no special limit on the size. alloc_page/dma_alloc...: It is allocated from buddy. the maximum size is 4 MB or 8 MB, which is limited by MAX_ORDER. physically continuous.