Re: Allocate userspace memory

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

 



Hi

I think technically it is possible. Although I don't know the exact how-to, it can be done by kmalloc(GFP_USER), and then creating proper VMA (or insert the page to a VMA).
this can be done how?

Sorry,  I don't know the detail. try to check LDD3...
the problem is that i do not know the size of data chunk before i ask kernel to fill it.
OK, since I don't know your exact detail, I can only suggest this. Certainly the size of the data you want to pass to the user space have maximum size, right? So, why not allocate that much first? This way:
1. You'll leave the management of memory block to the user space.
2. user space has freedom to decide where to put the allocated memory and in case of no free memory space available, kernel can anticipate that so it can delay to transfer the data.

I hope it may help you....

regards,

Mulyadi


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux