RFR: 8313856: Replace VLA with malloc in pango

Kevin Rushforth kcr at openjdk.org
Mon Aug 7 12:37:36 UTC 2023


On Mon, 7 Aug 2023 04:55:23 GMT, Jayathirth D V <jdv at openjdk.org> wrote:

> We should not use stack for array memory allocations in JNI.
> Updated pango.c to use malloc for arrays and release them at appropriate places.

Looks good.

One slight clarification:

> We should not use stack for array memory allocations in JNI.

To be more precise, we shouldn't use stack allocation for _variable length_ arrays. It's OK to use stack memory for relatively small, fixed-length arrays.

-------------

Marked as reviewed by kcr (Lead).

PR Review: https://git.openjdk.org/jfx/pull/1202#pullrequestreview-1565226650


More information about the openjfx-dev mailing list