Page 1 of 1

e_alloc vs e_shm_alloc

PostPosted: Thu Jun 04, 2015 5:12 pm
by skinner
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.

Re: e_alloc vs e_shm_alloc

PostPosted: Tue Jun 09, 2015 10:09 pm
by skinner
Up !

Any help is appreciated :)

Regards,

Thomas.