Open wrrobin opened 1 year ago
@stewartl318 - I was trying to add you as a reviewer on this, but not able to. I am trying this way to send a notification.
As a general comment, I am personally in favor of alloc_single and in favor of the address translation idea, but opposed to varsize.
I think that varsize clutters up the API without providing any benefits.
The alternative is just to allocate the full requested size on every PE, but not put real memory behind it. This could result in runtime failures if the user tries to put and get to memory that is not there, but in the varsize case, there are no checks to verify that addresses are actually inside the varsize region anyway, so it is no different.
So, what is the precise benefit of varsize that justifies an API change?
There is also an argument that alloc_single can equally well be dealt with by using sbrk to expand the globals and statics region, and fcollect _end.
This PR introduces the single PE allocation API and related changes. New APIs being added are as below.
A simple unit test is used to test the APIs.