Re: Packing data in kernel memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>Subject: Packing data in kernel memory
>

Can't you just use mlock(), if you want to keep it in RAM?

Or do you need it in kernel memory, because you need it in the lowmem area? 
Or for interaction with other kernel code?

>Is there a way to pack and store arbitrary data in the kernel, or do I
>need to roll my own?
>

Write a device driver, kmalloc some buffer, and copy data via a write 
function from userspace to that buffer. Should be trivial.

>1 excess pages, 4 units wasted memory.

Of course, kmalloc only works up to some boundary AFIACS.


Jan Engelhardt
-- 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux