Mercurial > hg > graal-jvmci-8
diff src/share/vm/memory/metablock.cpp @ 8712:3efdfd6ddbf2
8003553: NPG: metaspace objects should be zeroed in constructors
Summary: Zero metadata in constructors, not in allocation (and some in constructors)
Reviewed-by: jmasa, sspitsyn
author | coleenp |
---|---|
date | Fri, 08 Mar 2013 11:47:57 -0500 |
parents | eade6b2e4782 |
children | 5939f5953b45 |
line wrap: on
line diff
--- a/src/share/vm/memory/metablock.cpp Thu Mar 07 14:06:44 2013 -0500 +++ b/src/share/vm/memory/metablock.cpp Fri Mar 08 11:47:57 2013 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. 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 @@ -65,10 +65,9 @@ } Metablock* result = (Metablock*) p; - - // Clear the memory - Copy::fill_to_aligned_words((HeapWord*)result, word_size); #ifdef ASSERT + // Add just to catch missing initializations + Copy::fill_to_words((HeapWord*) result, word_size, 0xf1f1f1f1); result->set_word_size(word_size); #endif return result;