[lkml]   [2020]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectQuestion about output of kmalloc()

Below code snippet in the .ko:

unsigned long *p = (unsigned long *)kmalloc(sizeof(*p), GFP_KERNEL);
printk("Addr of p = 0x%p\n", p);

The output is:
Addr of p = 0x0000000018606ce7

In my mind, during the early day, the p should be 0xfffff...., can
anybody give some tips why the output looks like it's a physical

 \ /
  Last update: 2020-01-14 08:21    [W:0.039 / U:27.748 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site