Java .class文件是否存储在JVM内存中(Is the Java .class file stored in JVM memory)
我阅读了JVM内存模型,并对以下内容感到困惑:
- JVM是否将.class实例存储在其内存中。 如果是,则在哪个区域。
- 就像加载类一样,JVM生成机器级代码然后开始执行机器代码指令,然后只在堆上创建对象并填充方法区域。
- perm gen等区域存储字节码或机器级代码?
- 烫发与方法区域
我真的很感谢这个话题的任何帮助。
谢谢。
I read on the JVM memory model and got confused with the follows:
- Does the JVM store the .class instance in its memory. If yes then in which area.
- Is it like as soon as the class is loaded,the JVM generated machine level code and then starts executing the machine code instructions and then only the objects are created on heap and method area is populated.
- The perm gen etc areas store the byte code or the machine level code?
- perm gen vs method area
I would really appreciate any help on the topic.
Thanks.
原文:https://stackoverflow.com/questions/12284482
更新时间:2023-11-02 07:11
最满意答案
JFYI:我的“解决方案”是购买打印机(HP PhotoSmart)和一些照片纸,并通过优化图形调整特定打印机和特定类型纸张的输出,使重要部件不会被切断。
JFYI: My "solution" has been to buy a printer (HP PhotoSmart) and some photo paper and to adjust the output to that specific printer and that specific type of paper, by optimizing the graphic so the important parts don't get cut off.
相关问答
更多-
您可以使用以下功能下载图像: func getImage(_ url:String,handler: @escaping (UIImage?)->Void) { print(url) Alamofire.request(url, method: .get).responseImage { response in if let data = response.result.value { handler(data) ...
-
NSData和UIImage(NSData and UIImage)[2023-04-04]
UIImage有一个 - initWithData:方法。 从文档:“数据参数中的数据必须格式化以匹配系统支持的图像类型之一的文件格式。 UIImage has an -initWithData: method. From the docs: "The data in the data parameter must be formatted to match the file format of one of the system’s supported image types." -
UIImage提供图像的位图(未压缩)版本,可用于将图像渲染到屏幕。 可以通过降低图像的质量(有效的颜色方差)来压缩图像的JPEG数据,但这仅在JPEG数据中。 将压缩的JPEG解压缩到UIImage它再次需要完整的位图大小(基于颜色格式和图像尺寸)。 基本上,保持最佳质量的图像,您可以在上传之前进行显示和压缩。 A UIImage provides a bitmap (uncompressed) version of the image which can be used for rendering th ...
-
您的getImageFromData定义返回Void(一个类型,其唯一成员也被称为Void,又名空元组,())。 它不返回图像。 您需要在回调闭包内部设置图像,而不是分配函数的不存在的返回值。 Your definition of getImageFromData returns Void (a type whose only member is also called Void, a.k.a the empty tuple, ()). It doesn't return an image. You nee ...
-
尝试 if allStyleArrays[i][ii][iii].imageAsset == nil try if allStyleArrays[i][ii][iii].imageAsset == nil
-
UIImage UIImageJPEGRepresentation对UIImage安全(UIImage UIImageJPEGRepresentation safe to UIImage)[2023-03-08]
我不知道你为什么要从UIImage转到jpeg数据然后再回到UIImage,但[UIImage imageWithData:jpegdata]应该这样做。 I have no idea why you are wanting to go from a UIImage to jpeg data and then right back to a UIImage, but [UIImage imageWithData:jpegdata] should do it. -
您正在尝试在正确呈现之前从视图创建。 您可以在didAppear中创建图像,也可以在单击共享按钮时创建图像。 试试这个修改过的代码 @IBOutlet var viewBack: UIView! @IBOutlet var dismissButton: UIButton! @IBOutlet var shareButton: UIButton! @IBOutlet var imageView: UIImageView! @IBOutlet var hello: UILabel! var im ...
-
JFYI:我的“解决方案”是购买打印机(HP PhotoSmart)和一些照片纸,并通过优化图形调整特定打印机和特定类型纸张的输出,使重要部件不会被切断。 JFYI: My "solution" has been to buy a printer (HP PhotoSmart) and some photo paper and to adjust the output to that specific printer and that specific type of paper, by optimizin ...
-
如何在Swift中识别UIImage数组中的Tapped UIImage(How to Identify Tapped UIImage in UIImage array in Swift)[2023-07-15]
在您的imageView中添加手势识别器,如下所示: //Instance Variable let tapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(self.imageTapped(_:))) tapGestureRecognizer.numberOfTapsRequired = 1 tapGestureRecognizer.numberOfTouchesRequir ... -
Pixellating UIImage会返回不同大小的UIImage(Pixellating a UIImage returns UIImage with a different size)[2023-03-21]
你有两个问题: self.size以点数衡量。 self的大小(以像素为单位)实际上是self.size乘以self.scale 。 CIPixellate过滤器更改其图像的边界。 要修复问题1,您可以简单地将返回的UIImage的scale属性设置为与self.scale相同: return UIImage(ciImage: output, scale: self.scale, orientation: imageOrientation) 但你会发现这仍然不太对劲。 这是因为问题二。 对于问题二,最简单 ...