RFR: 8256256: UL should not use heap allocation for output string [v2]
David Holmes
dholmes at openjdk.java.net
Tue Dec 1 04:50:02 UTC 2020
On Wed, 18 Nov 2020 05:15:41 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Yumin Qi has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Use malloc/free for large log message buffer
>
> src/hotspot/share/logging/logTagSet.cpp line 129:
>
>> 127: if ((size_t)ret >= sizeof(buf)) {
>> 128: size_t newbuf_len = prefix_len + ret + 1;
>> 129: char* newbuf = (char*)::calloc(newbuf_len, sizeof(char));
>
> Do we need to zero the array with calloc?
> The `(char*)` cast shouldn't be needed.
The calloc query has not been addressed.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1246
More information about the hotspot-runtime-dev
mailing list