Page 1 of 1

Where and how much memory can I allocated?

PostPosted: Tue Dec 30, 2014 1:04 am
by eliecer
Hi,

When I use the function malloc in the cores, where does it allocates memory? In the Epiphany Architecture Reference there is a picture where I can see the banks 0, 1, 2 and 3, reserved memory and memory mapped registers in each core. Where does it allocates memory? And how much memory can I allocated?

I have a problem with my app and I think that it is for the allocated memory.

Thank you

Re: Where and how much memory can I allocated?

PostPosted: Wed Dec 31, 2014 1:40 pm
by aolofsson
Are you trying to run standard "malloc" from within a core? The quick recommendation is, don't...can you say more about what you are trying to do?
Andreas

Re: Where and how much memory can I allocated?

PostPosted: Wed Dec 31, 2014 2:36 pm
by eliecer
I try to used a function of other person. I have modified the function, now it don't need to do malloc.

But... I am interested in to know where and how much memory can I to allocate.

Thank you Andreas.

Re: Where and how much memory can I allocated?

PostPosted: Mon Jan 05, 2015 3:38 pm
by sebraa
The default linker scripts (I checked fast.ldf) define a 512 KB heap for each core, located in the upper half of shared memory, starting from 0x8f000000 + 512K*CORE_NUM. So if you use malloc(), you get memory from there.

Everything else you have to allocate manually.