Discussion about Parallella (and Epiphany) Software Development

Moderators: amylaar, jeremybennett, simoncook


Postby Nader_Jendoubi » Mon Mar 16, 2015 11:24 am

in the "hello world" example:

what the following expressions are used for:

const char ShmName[] = "hello_shm";

e_shm_attach(&emem, ShmName);

e_shm_alloc(&mbuf, ShmName, ShmSize)

because i didn't find these 2 last functions in epiphany SDK manuel and the didn't understand the utility for ShmName

can i use e_alloc instead of these 2 functions???
Posts: 41
Joined: Wed Feb 18, 2015 6:53 pm

Re: ShmName

Postby skinner » Fri Jun 05, 2015 3:48 pm

Hi !

Did you ever find an answer to your question because I'm quite interrested myself to know in which case it is better to use e_alloc or e_shm_alloc ?

If not then at least I can say that e_shm_alloc has basically the same behaviour as e_alloc except that you give a name (a tag) to the shared memory space. This way you can "attach" yourself to this shared memory space by giving its name to e_shm_attach. As far as I understand, it allows us not to care about the offsets inside the shared area since there must be some hidden mechanism taking care of it with the tag/name system.


Posts: 21
Joined: Mon Jun 01, 2015 11:14 pm

Re: ShmName

Postby etim » Tue Sep 29, 2015 9:30 am

I'm wondering this too. Is it like a key or pointer to a block of memory that is auto assigned?
Posts: 22
Joined: Sat Jun 27, 2015 6:08 pm

Return to Programming Q & A

Who is online

Users browsing this forum: No registered users and 5 guests