This is unnecessary, since this only affects the java heap and only on zgc. And a private section should not show up as a file-mapped section. A better way to do this is the way the regression test works on Linux, where it uses a separate regex for the java heap.
Additionally, since not everyone remembers to run the tests with ZGC, it would be better to add an separate @test section that runs this test with -XX:+UseZGC explicitly specified.