[dpdk-users] Using memzone for sharing memory
keith.wiles at intel.com
Tue May 8 15:07:44 CEST 2018
> On May 6, 2018, at 7:04 AM, hom.sepanta at gmail.com wrote:
> Hi everyone. I was wondering if the virtual address of memzones remains the
> same across different processes. The memzone docs mention the same physical
> address is returned but there is no mention of the virtual address. A
> little bit of testing makes it look like that the virtual address is also
> the same, but I can't be sure about that.
Normally the virtual address of memory shared between to processes could be different it just depends on the kernel and other factors.
> The interesting thing about this for me is that if the same virtual address
> is always returned, I could store and share complex data structures with
> internal pointers in a memzone.
I have seen this to be true, but you can not count on the fact for all cases.
> Does this sound possible? If using memzones is not the correct approach for
> this, could you suggest another course of action?
You have to use offsets in the shared memory or some other method to determine the correct virtual address in each process.
More information about the users