Is kmalloc allocation not virtually contiguous?
问题 I found that kmalloc returns physically and virtually contiguous memory. I wrote some code to observe the behavior, but only the physical memory seems to be contiguous and not the virtual. Am I making any mistake? #include <linux/kernel.h> #include <linux/module.h> #include <linux/slab.h> #include <linux/moduleparam.h> MODULE_LICENSE("GPL"); static char *ptr; int alloc_size = 1024; module_param(alloc_size, int, 0); static int test_hello_init(void) { ptr = kmalloc(alloc_size,GFP_ATOMIC); if(