2002-08-27 00:01:51

by Michael Bellion

[permalink] [raw]
Subject: Finding out whether memory was allocated with kmalloc or vmalloc

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



2002-08-27 00:11:59

by Ralf Baechle

[permalink] [raw]
Subject: Re: Finding out whether memory was allocated with kmalloc or vmalloc

On Tue, Aug 27, 2002 at 04:06:16AM +0200, Michael Bellion wrote:

> 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