comparison src/share/vm/asm/codeBuffer.cpp @ 6275:957c266d8bc5

Merge with http://hg.openjdk.java.net/hsx/hsx24/hotspot/
author Doug Simon <doug.simon@oracle.com>
date Tue, 21 Aug 2012 10:39:19 +0200
parents 04b9a2566eec d2a62e0f25eb
children e522a00b91aa
comparison
equal deleted inserted replaced
5891:fd8832ae511d 6275:957c266d8bc5
259 } 259 }
260 260
261 261
262 GrowableArray<int>* CodeBuffer::create_patch_overflow() { 262 GrowableArray<int>* CodeBuffer::create_patch_overflow() {
263 if (_overflow_arena == NULL) { 263 if (_overflow_arena == NULL) {
264 _overflow_arena = new Arena(); 264 _overflow_arena = new (mtCode) Arena();
265 } 265 }
266 return new (_overflow_arena) GrowableArray<int>(_overflow_arena, 8, 0, 0); 266 return new (_overflow_arena) GrowableArray<int>(_overflow_arena, 8, 0, 0);
267 } 267 }
268 268
269 269
908 908
909 void CodeBuffer::block_comment(intptr_t offset, const char * comment) { 909 void CodeBuffer::block_comment(intptr_t offset, const char * comment) {
910 _comments.add_comment(offset, comment); 910 _comments.add_comment(offset, comment);
911 } 911 }
912 912
913 class CodeComment: public CHeapObj { 913 class CodeComment: public CHeapObj<mtCode> {
914 private: 914 private:
915 friend class CodeComments; 915 friend class CodeComments;
916 intptr_t _offset; 916 intptr_t _offset;
917 const char * _comment; 917 const char * _comment;
918 CodeComment* _next; 918 CodeComment* _next;
919 919
920 ~CodeComment() { 920 ~CodeComment() {
921 assert(_next == NULL, "wrong interface for freeing list"); 921 assert(_next == NULL, "wrong interface for freeing list");
922 os::free((void*)_comment); 922 os::free((void*)_comment, mtCode);
923 } 923 }
924 924
925 public: 925 public:
926 CodeComment(intptr_t offset, const char * comment) { 926 CodeComment(intptr_t offset, const char * comment) {
927 _offset = offset; 927 _offset = offset;
928 _comment = os::strdup(comment); 928 _comment = os::strdup(comment, mtCode);
929 _next = NULL; 929 _next = NULL;
930 } 930 }
931 931
932 intptr_t offset() const { return _offset; } 932 intptr_t offset() const { return _offset; }
933 const char * comment() const { return _comment; } 933 const char * comment() const { return _comment; }