Skip to contentSkip to conversation

shared heap access mixing 32 and 64 bits applications

Xenomai Stéphane Ancelot 3 participants 4 messages Jan 26, 2017 – Jan 27, 2017

lore
Share & tools
lore
#0 lore raw

Hi,

Is it possible to access same shared memory heaps , between 32 and 64 bits processes ?

Regards,

S.Ancelot

#1 lore raw
Quoted 1 line

Is it possible to access same shared memory heaps , between 32 and 64 bits processes ?

In regular linux I faced the wall when trying to protect the usage of the shared memory area by (pthread iirc) mutex/semaphore - those structures had differences between 32/64bit platforms. I don't know if situation is same in Xenomai but pay attention also to what you are going to put in the shared memory.

-Lassi

#2 lore raw
Quoted 4 lines · Lassi Niemistö
Quoted 1 line

Is it possible to access same shared memory heaps , between 32 and 64 bits processes ?

In regular linux I faced the wall when trying to protect the usage of the shared memory area by (pthread iirc) mutex/semaphore - those structures had differences between 32/64bit platforms. I don't know if situation is same in Xenomai but pay attention also to what you are going to put in the shared memory.

-Lassi

I have now the answer regarding xenomai shared heaps between 32 and 64 bits processes , here is the status, if you use the latest next xenomai branch. within a system running 64 bits xenomai kernel, you can :
* use shared heap areas with 32 bits xenomai processes
* use shared heap areas with 64 bits xenomai processes
* you can not use shared heap areas between 32 and 64 bits xenomai processes.
Each area (32/64) are insulated, this incompatibility issue comes mainly from usage of size_t type in the xenomai heap library which are different between 32 and 64 bits systems. and maybe more other reasons ...

So, this is good to know that incompatibility , you can not mix both kind of processes in xenomai.

Regards,
S.Ancelot

#3 lore raw
Quoted 26 lines · Stéphane Ancelot
Quoted 9 lines · Lassi Niemistö
Quoted 2 lines

Is it possible to access same shared memory heaps , between 32 and 64 bits processes ?

In regular linux I faced the wall when trying to protect the usage of the shared memory area by (pthread iirc) mutex/semaphore - those structures had differences between 32/64bit platforms. I don't know if situation is same in Xenomai but pay attention also to what you are going to put in the shared memory.

-Lassi

I have now the answer regarding xenomai shared heaps between 32 and 64 bits processes , here is the status, if you use the latest next xenomai branch.
within a system running 64 bits xenomai kernel, you can :
* use shared heap areas with 32 bits xenomai processes
* use shared heap areas with 64 bits xenomai processes
* you can not use shared heap areas between 32 and 64 bits xenomai processes.
Each area (32/64) are insulated, this incompatibility issue comes mainly from usage of size_t type in the xenomai heap library which are different between 32 and 64 bits systems.
and maybe more other reasons ...

Quoted 2 lines

So, this is good to know that incompatibility , you can not mix both kind of processes in xenomai.

There is absolutely no provision for sharing Xenomai sessions in general between 32/64 bit applications, and there won't be any, ever. Mixed ABI support relates to invoking 64bit kernel services from a 32bit application, nothing beyond that.

Signature · 1 line
Philippe.