* [dpdk-users] Using memzone for sharing memory
@ 2018-05-06 12:04 hom.sepanta
2018-05-08 13:07 ` Wiles, Keith
0 siblings, 1 reply; 2+ messages in thread
From: hom.sepanta @ 2018-05-06 12:04 UTC (permalink / raw)
To: users
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.
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.
Does this sound possible? If using memzones is not the correct approach for
this, could you suggest another course of action?
Cheers,
Mostafa
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-users] Using memzone for sharing memory
2018-05-06 12:04 [dpdk-users] Using memzone for sharing memory hom.sepanta
@ 2018-05-08 13:07 ` Wiles, Keith
0 siblings, 0 replies; 2+ messages in thread
From: Wiles, Keith @ 2018-05-08 13:07 UTC (permalink / raw)
To: hom.sepanta; +Cc: users
> On May 6, 2018, at 7:04 AM, hom.sepanta@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.
>
> Cheers,
> Mostafa
Regards,
Keith
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-05-08 13:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-06 12:04 [dpdk-users] Using memzone for sharing memory hom.sepanta
2018-05-08 13:07 ` Wiles, Keith
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).