Skip to contentSkip to conversation

Finding out whether memory was allocated with kmalloc or vmalloc

DISCUSSION Michael Bellion 2 participants 2 messages Aug 27, 2002

lore
Share & tools
lore
#0 lore raw

Hi,

given a pointer p, is there an easy and platform independent way to find out, whether the memory location that p points to was allocated with kmalloc or vmalloc?

Thanks
Michael Bellion

#1 lore raw
Quoted 3 lines · Michael Bellion

given a pointer p, is there an easy and platform independent way to find out, whether the memory location that p points to was allocated with kmalloc or vmalloc?

Vmalloc'ed memory has a virtual address VMALLOC_START <= x < VMALLOC_END.

Ralf