142 void CodeBlob::set_oop_maps(OopMapSet* p) { |
142 void CodeBlob::set_oop_maps(OopMapSet* p) { |
143 // Danger Will Robinson! This method allocates a big |
143 // Danger Will Robinson! This method allocates a big |
144 // chunk of memory, its your job to free it. |
144 // chunk of memory, its your job to free it. |
145 if (p != NULL) { |
145 if (p != NULL) { |
146 // We need to allocate a chunk big enough to hold the OopMapSet and all of its OopMaps |
146 // We need to allocate a chunk big enough to hold the OopMapSet and all of its OopMaps |
147 _oop_maps = (OopMapSet* )NEW_C_HEAP_ARRAY(unsigned char, p->heap_size()); |
147 _oop_maps = (OopMapSet* )NEW_C_HEAP_ARRAY(unsigned char, p->heap_size(), mtCode); |
148 p->copy_to((address)_oop_maps); |
148 p->copy_to((address)_oop_maps); |
149 } else { |
149 } else { |
150 _oop_maps = NULL; |
150 _oop_maps = NULL; |
151 } |
151 } |
152 } |
152 } |