e_alloc vs e_shm_alloc

Discussion about Parallella (and Epiphany) Software Development

Moderators: amylaar, jeremybennett, simoncook

e_alloc vs e_shm_alloc

Postby skinner » Thu Jun 04, 2015 5:12 pm

Hi !

I have a question concerning the allocation of the external memory. In the e-hal API, two functions exist, using the same e_mem_t type for memory description : e_alloc and e_shm_alloc.

As far as i understand, both functions can create a shared memory space between the host and the epiphany. The first function allocates a memory space using the given offset and can so override some already used memory if we are not careful. The last function however, allocates a memory space simply by giving it a distinctive name. I suppose there is a mechanism behind mapping a segment among the free ones with the given name (and so there are no chance to access a segment in which some addresses are already in use).

Can someone confirm my thoughts or correct me if i'm wrong because right now i can't see any other differences ?

Moreover, the few examples i've looked at seem all to use the e_shm_alloc function rather than the e_alloc, which could be comprehensible if my previous statement is true.

Thanks in advance,

Regards,

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

Re: e_alloc vs e_shm_alloc

Postby skinner » Tue Jun 09, 2015 10:09 pm

Up !

Any help is appreciated :)

Regards,

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


Return to Programming Q & A

Who is online

Users browsing this forum: No registered users and 8 guests