Skip to content

Commit

Permalink
Don't zap pre-zeroed unaligned chunks.
Browse files Browse the repository at this point in the history
  • Loading branch information
christianhaeubl committed Oct 24, 2023
1 parent d5a3b1a commit 129fa26
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@ UnalignedHeader produceUnalignedChunk(UnsignedWord objectSize) {
UnalignedHeapChunk.initialize(result, chunkSize);
assert objectSize.belowOrEqual(HeapChunk.availableObjectMemory(result)) : "UnalignedHeapChunk insufficient for requested object";

if (HeapParameters.getZapProducedHeapChunks()) {
/* Avoid zapping if unaligned chunks are pre-zeroed. */
if (!CommittedMemoryProvider.get().areUnalignedChunksZeroed() && HeapParameters.getZapProducedHeapChunks()) {
zap(result, HeapParameters.getProducedHeapChunkZapWord());
}
return result;
Expand Down

0 comments on commit 129fa26

Please sign in to comment.