In JDK-8381934 "Wrong type passed to FREE_C_HEAP_ARRAY deallocating G1CardSetMemoryManager" we saw how the wrong type was being passed to the FREE_C_HEAP_ARRAY macro. That bug is benign, because the type parameter is not used. I see that we have similar issues in some of our gtests. I propose that we get rid of the type parameter to remove this confusion and lower the line noise on these lines.
I also propose that we get rid of it from the REALLOC_ macros. These macros however are using the type parameter, but we can infer the type from the other parameters, so I propose that we do that instead. Tested with tier1-3 --------- - [x] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). ------------- Commit messages: - 8382401: Remove return type parameters from FREE_ and REALLOC_ macros Changes: https://git.openjdk.org/jdk/pull/30786/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=30786&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8382401 Stats: 431 lines in 183 files changed: 3 ins; 4 del; 424 mod Patch: https://git.openjdk.org/jdk/pull/30786.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/30786/head:pull/30786 PR: https://git.openjdk.org/jdk/pull/30786
