1.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/binaryTreeDictionary.cpp Fri Jun 27 19:12:11 2008 -0700 1.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/binaryTreeDictionary.cpp Wed Jul 09 15:08:55 2008 -0700 1.3 @@ -71,8 +71,15 @@ 1.4 TreeList* TreeList::as_TreeList(HeapWord* addr, size_t size) { 1.5 TreeChunk* tc = (TreeChunk*) addr; 1.6 assert(size >= sizeof(TreeChunk), "Chunk is too small for a TreeChunk"); 1.7 - assert(tc->size() == 0 && tc->prev() == NULL && tc->next() == NULL, 1.8 - "Space should be clear"); 1.9 + // The space in the heap will have been mangled initially but 1.10 + // is not remangled when a free chunk is returned to the free list 1.11 + // (since it is used to maintain the chunk on the free list). 1.12 + assert((ZapUnusedHeapArea && 1.13 + SpaceMangler::is_mangled((HeapWord*) tc->size_addr()) && 1.14 + SpaceMangler::is_mangled((HeapWord*) tc->prev_addr()) && 1.15 + SpaceMangler::is_mangled((HeapWord*) tc->next_addr())) || 1.16 + (tc->size() == 0 && tc->prev() == NULL && tc->next() == NULL), 1.17 + "Space should be clear or mangled"); 1.18 tc->setSize(size); 1.19 tc->linkPrev(NULL); 1.20 tc->linkNext(NULL);