How do you create a file descriptor from memory (oposite of mmap)?

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

 



If mmap maps a file or device into memory, how do I do the reverse?
I have some already-allocated memory, and I want to create a file
descriptor from it that I can pass around.  (shm_open doesn't do this,
because I already have allocated memory.)

Apparently Windows can do this:  you can create a handle from some
arbitrary region of user-allocated memory.  Can Linux?

Thanks,
Dave

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           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