<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 8, 2021 at 12:44 AM Chris Johns <<a href="mailto:chrisj@rtems.org">chrisj@rtems.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 8/2/21 5:38 pm, Sebastian Huber wrote:<br>
> <br>
> On 08/02/2021 07:30, <a href="mailto:chrisj@rtems.org" target="_blank">chrisj@rtems.org</a> wrote:<br>
>> diff --git a/cpukit/libcsupport/src/rtems_heap_greedy.c<br>
>> b/cpukit/libcsupport/src/rtems_heap_greedy.c<br>
>> index 4dda39873f..2361f17d2e 100644<br>
>> --- a/cpukit/libcsupport/src/rtems_heap_greedy.c<br>
>> +++ b/cpukit/libcsupport/src/rtems_heap_greedy.c<br>
>> @@ -30,8 +30,20 @@ void *rtems_heap_greedy_allocate(<br>
>> size_t block_count<br>
>> )<br>
>> {<br>
>> + Heap_Control *heap = RTEMS_Malloc_Heap;<br>
>> + size_t size = 128 * 1024 * 1024;<br>
>> void *opaque;<br>
>> + while (size > 0) {<br>
>> + opaque = (*rtems_malloc_extend_handler)( heap, size );<br>
>> + if (opaque == NULL) {<br>
>> + size >>= 1;<br>
>> + } else {<br>
>> + if ( rtems_malloc_dirty_helper != NULL )<br>
>> + (*rtems_malloc_dirty_helper)( opaque, size );<br>
>> + }<br>
>> + }<br>
> You need a couple of more ' ' after and before the braces. Each if should have a<br>
> { }. Apart from the formatting it looks good.<br>
<br>
Thanks, I will fix the formatting and push.<br>
<br>
And there is no performance issue on hardware so that must be a psim thing.<br></blockquote><div><br></div><div>What performance issue do you think there could have been?</div><div><br></div><div>This must just be a side-effect of the PowerPC BSPs which have more than 32MB </div><div>RAM and want to support dynamically loading code. They must ensure that no</div><div>branches or calls exceed 32MB from the current location. Thus it has to be loaded </div><div>early in program life before the heap is extended. </div><div><br></div><div>Are there other supported architectures where code must fit into a subset of the</div><div>address space where it could negatively impact dynamic loading?</div><div><br></div><div>How does the DL code deal with PPC code that is built without the -mlongcall </div><div>option?</div><div><br></div><div>EPICS discusses this here:<br><br><a href="https://epics.anl.gov/base/ppc.php">https://epics.anl.gov/base/ppc.php</a><br></div><div><br></div><div>--joel</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Chris<br>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a></blockquote></div></div>