Can i use ksize on memory allocated by vmalloc

123 Views Asked by At

Can i use ksize on memory allocated by vmalloc.

I know ksize is used to determine the actual amount of memory allocated

So, i wanted to find out whether vmalloc round up allocations and return more memory than requested.

Will the below code works?

ptr =vmalloc(1);
printk("I got: %zu bytes of memory\n", ksize(ptr));
vfree(ptr);
0

There are 0 best solutions below