1. From Murtaza's original post, the compiler works till 512 MB are allocated. While SDSCM00043877 indicates the size is limited to 256 MB. So which is it?
I have been using ~500 MB of heap without any (apparent) problem:
CFG file:
var heapMemParamsX = new HeapMem.Params;
heapMemParamsX.size = 0x1FFFFF00;
heapMemParamsRM.instance.name = "heapX";
heapMemParamsRM.sectionName = "xHeap";
Program.global.xHeap = HeapMem.create(heapMemParamsX);
Map file:
run origin load origin length init length attrs members
---------- ----------- ---------- ----------- ----- -------
d8000000 d8000000 1fffff00 00000000 rw- xHeap
Seems to me the compiler works till 512 MB. Or is it recommended to use only 256 MB. I mean, not seeing an issue or not being able to track a problem to this issue does not prove a problem does not exist.
2. When I increase the heap size to anything over 512 MB, the map file shows incorrect length (as expected).
CFG file:
heapMemParamsX.size = 0x203D0000;
Map file:
dd000000 dd000000 003d0000 00000000 rw- xHeap
But, the allocations made through the Mem_alloc on this heap don't fail even if the amount surpasses 512 MB. So, we never detect there is any problem. Or trace any memory corruption or CPU crashes to this cause.
The issue is not a minor bug as made out in the bug report SDSCM00043877 IMHO.
3. What is a workaround for the issue? My system needs several hundred MBs of contiguous memory, 256 MB limit is a show stopper.
Thanks,
Shivang