< prev index next > test/hotspot/jtreg/runtime/NMT/MallocSiteTypeChange.java
Print this page
/*
! * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, Red Hat, Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
/*
! * Copyright (c) 2025, 2026, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, Red Hat, Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
output = NMTTestUtils.startJcmdVMNativeMemory("baseline");
output.shouldContain("Baseline taken");
wb.NMTFree(addr);
! addr = wb.NMTMallocWithPseudoStackAndType(2 * 1024, pc, 9 /* mtInternal */ );
output = NMTTestUtils.startJcmdVMNativeMemory("detail.diff");
output.shouldContain("(malloc=0KB type=Test -4KB)");
output.shouldContain("(malloc=2KB type=Internal +2KB #1 +1)");
output.shouldHaveExitValue(0);
}
output = NMTTestUtils.startJcmdVMNativeMemory("baseline");
output.shouldContain("Baseline taken");
wb.NMTFree(addr);
! addr = wb.NMTMallocWithPseudoStackAndType(2 * 1024, pc, 8 /* mtInternal */ );
output = NMTTestUtils.startJcmdVMNativeMemory("detail.diff");
output.shouldContain("(malloc=0KB type=Test -4KB)");
output.shouldContain("(malloc=2KB type=Internal +2KB #1 +1)");
output.shouldHaveExitValue(0);
}
< prev index next >