hotspot/src/share/vm/asm/codeBuffer.cpp
changeset 13195 be27e1b6a4b9
parent 10983 9ab65f4cec18
child 13728 882756847a04
--- a/hotspot/src/share/vm/asm/codeBuffer.cpp	Wed Jun 27 15:23:36 2012 +0200
+++ b/hotspot/src/share/vm/asm/codeBuffer.cpp	Thu Jun 28 17:03:16 2012 -0400
@@ -261,7 +261,7 @@
 
 GrowableArray<int>* CodeBuffer::create_patch_overflow() {
   if (_overflow_arena == NULL) {
-    _overflow_arena = new Arena();
+    _overflow_arena = new (mtCode) Arena();
   }
   return new (_overflow_arena) GrowableArray<int>(_overflow_arena, 8, 0, 0);
 }
@@ -910,7 +910,7 @@
   _comments.add_comment(offset, comment);
 }
 
-class CodeComment: public CHeapObj {
+class CodeComment: public CHeapObj<mtCode> {
  private:
   friend class CodeComments;
   intptr_t     _offset;
@@ -919,13 +919,13 @@
 
   ~CodeComment() {
     assert(_next == NULL, "wrong interface for freeing list");
-    os::free((void*)_comment);
+    os::free((void*)_comment, mtCode);
   }
 
  public:
   CodeComment(intptr_t offset, const char * comment) {
     _offset = offset;
-    _comment = os::strdup(comment);
+    _comment = os::strdup(comment, mtCode);
     _next = NULL;
   }