I noticed the test-memory target which seems to have been added in
CASSANDRA-15388. Unfortunately, since then java-allocation-instrumenter which was added as a dependency was not really maintained by the authors. I think this is the official repo - https://github.com/google/allocation-instrumenter and last commit was to support Java 8 in 2020. The test itself was also not added to CI.
Confirmed with dcapwell in Slack