RFR: 8297766: Remove UseMallocOnly development option

Afshin Zafari duke at openjdk.org
Fri Dec 2 13:23:16 UTC 2022


On Thu, 1 Dec 2022 18:51:21 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> Good riddance :-)
> 
> I think `HandleArea` can be simplified too. It does a lot of gymnastics to work around the UseMallocOnly mode.
> 
> I believe you can scratch `HandleArea::real_allocate_handle()` and redirect `HandleArea::allocate_handle()` to directly call `Arena::Amalloc`. Have not tested though.

The current Call hierarchy is: 

HandleArea::allocate_handle()
  HandleArea::real_allocate_handle()
    Arena::internal_amalloc()

and your suggestion is:

HandleArea::allocate_handle()
  Arena::Amalloc()
    Arena::internal_malloc()

Question:
`Arena::Amalloc` has some more lines of code before calling `internal_malloc()`. So what to be done for these extra lines of codes? Can I simply replace `internal_malloc` with `Arena::Amalloc`?

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

PR: https://git.openjdk.org/jdk/pull/11456


More information about the hotspot-dev mailing list