8164921: Memory leaked when instrumentation.retransformClasses() is called repeatedly

Return Metablocks smaller than dictionary's dark matter.

Co-authored-by: Jon Masamitsu <jon.masamitsu@oracle.com>
Reviewed-by: mgerdin, sspitsyn, dsamersoff
This commit is contained in:
Coleen Phillimore 2016-10-18 08:39:43 -04:00
parent 39c74d7fdc
commit 04bc07be95
8 changed files with 270 additions and 44 deletions

View file

@ -1380,7 +1380,7 @@ methodHandle Method::clone_with_new_data(methodHandle m, u_char* new_code, int n
}
// copy annotations over to new method
newcm->copy_annotations_from(cm);
newcm->copy_annotations_from(loader_data, cm, CHECK_NULL);
return newm;
}