UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer geimel
Observer
948 Views
Registered: ‎02-05-2015

ZYNQ Heap Size - Malloc() Dual Core Standalone Problem

Jump to solution

Hello,

I have a problem with malloc() and a Dual-Core standalone Zynq project.

ARM0:

ps7_ddr_0_S_AXI_BASEADDR

BaseAdress: 0x01000000 Size 0x1FFFFFFF

Heap Size:0x1C000000

Stack Size: 0x2000

 

ARM1:

ps7_ddr_0_S_AXI_BASEADDR

BaseAdress: 0x02000000 Size 0x1FFFFFFF

Heap Size:0x1C000000

Stack Size: 0x2000

 

When I do a malloc() on Arm0 with 6MB size, Arm1 can't startup.

I think the problem is, malloc() allocate memory in the region  where program code ARM1  is. (0x2000000 ->.....?)

Should I protect the memory region from 0x2000000 to ?(I don't know the prgram size, perhaps 0x3000000) ?

How can i protect this memory region?

 

Thank you very much

 

Richard

0 Kudos
1 Solution

Accepted Solutions
Scholar ericv
Scholar
1,437 Views
Registered: ‎04-13-2015

Re: ZYNQ Heap Size - Malloc() Dual Core Standalone Problem

Jump to solution

@geimel

 

It looks like the memory of the 2 programs overlaps.

ARM0 memory spans 0x0100_0000 -> 0x20FF_FFFF

ARM1 memory spans 0x0200_0000 -> 0x21FF_FFFF

 

To not overlap, the size of both should be 0x0100_0000.

 

For the program size used, the information can be retrieved from the map file generated by the linker.

 

0 Kudos
1 Reply
Scholar ericv
Scholar
1,438 Views
Registered: ‎04-13-2015

Re: ZYNQ Heap Size - Malloc() Dual Core Standalone Problem

Jump to solution

@geimel

 

It looks like the memory of the 2 programs overlaps.

ARM0 memory spans 0x0100_0000 -> 0x20FF_FFFF

ARM1 memory spans 0x0200_0000 -> 0x21FF_FFFF

 

To not overlap, the size of both should be 0x0100_0000.

 

For the program size used, the information can be retrieved from the map file generated by the linker.

 

0 Kudos