Open naveen-rn opened 4 years ago
Item 2 may be true as a consequence of item 1, but I don't recall it being specified in this way. It might simplify coding for OpenSHMEM 1.5 to use this fact, but it could become cause a bug if a future specification invalidates this rule. Then again, it might also simplify the specification to adopt this as a rule. 🤷
I'm fine with (2), for now this is not an issue with our implementation. But, in future, I'm not sure whether there would be bugs when one PE gets a NULL and others get a valid ptr.
It would break symmetry if all PEs don't either successfully allocate memory or return NULL, right?
This may actually be an oversight in the shmem_malloc_with_hints
call. It can return NULL, but I'm not seeing a stipulation that the returned value must be NULL at all PEs in this case.
We have the following statement in the memory management subsection:
And, the following statement in the changes to document sections:
Just to be clear on the intended semantics - please clarify whether the following options can be considered as "no action" for the memory management operations:
shmem_malloc
,shmem_realloc
,shmem_align
, andshmem_calloc
, if thesize
is zeroshmem_malloc
andshmem_calloc
is NULLptr
inshmem_free
is NULLcount
inshmem_calloc
is zeroAFAIU, (1), (3), and (4) seems correct. Not sure with (2). Please clarify.