On Thu, 25 May 2023 18:18:43 GMT, Martin Doerr <[email protected]> wrote:
>> src/hotspot/share/utilities/globalDefinitions_xlc.hpp line 47:
>>
>>> 45: #undef malloc
>>> 46: extern void *malloc(size_t) asm("vec_malloc");
>>> 47: #endif
>>
>> Wow! And I don't mean that in a good way. I'm not questioning whether this
>> is correct, just commenting
>> on how crazy it seems that such a thing might be needed.
>
> The crazy thing is that `malloc` is defined! That means all places where we
> use the term malloc are getting replaced without such a workaround. (E.g. for
> log tags.)
So, we do this only for malloc? Not for calloc, posix_memalign, realloc etc?
What about free?
As ugly as defining malloc is (and I remember QADRT), I hesitate about removing
that define.
Removing that define and hard-coding it here assumes 1) our replacement is
equivalent (ok, easy to check) 2) it will always be equivalent in future AIX
versions 3) pointers it returns work with the unchanged free() and realloc()
the system provides, and will always do so.
I don't know... I would not do this just to get rid of a warning.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14146#discussion_r1207078176