RFR: 8256256: UL should not use heap allocation for output string [v4]
Yumin Qi
minqi at openjdk.java.net
Wed Dec 2 04:09:08 UTC 2020
On Tue, 1 Dec 2020 04:47:02 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Yumin Qi has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fix Copyright year
>
> Changes requested by dholmes (Reviewer).
> >
> >
> > malloc/calloc return void* so need this cast.
>
> That wasn't the query I meant - I meant why calloc not malloc? Why do we
> need to zero this memory? Is that just to avoid needing to figure out if
> we have to NUL terminate ourselves somewhere?
>
Changed to use malloc, also attached a test case to simulate OOM (see bug link).
-------------
PR: https://git.openjdk.java.net/jdk/pull/1246
More information about the hotspot-runtime-dev
mailing list