分析时字节 [] 的大小和数量荒谬
我的一个 web 应用程序出现内存不足问题,并启动 Eclipse 的 TPTP 来找到它。令我震惊的是,最大的罪犯是 byte[],其实例数量和大小不断增加。有什么办法可以追踪它来自哪里吗?作为参考,我的软件堆栈是 Java 1.5、tomcat 5.5 和 spring 2.5。
I have been having an out of memory problem with one of my webapps and fired up Eclipse's TPTP to find it. I was shocked to the that the biggest offender was byte[] with an ever increasing number of instances and size. Is there any way to track down where that is coming from? For reference my software stack is Java 1.5, tomcat 5.5 and spring 2.5.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
byte[]
实例将来自网络通信(通过 JNI 传输套接字数据)、图像处理(存储BufferedImages
的数据)以及任何其他非本机ByteBuffers
你有。了解您拥有的应用程序类型会很有用:)(编辑:刚刚注意到 Tomcat 和 Spring。我会选择网络通信)byte[]
instances will be coming from network communications (transferring socket data through JNI), image processing (storing the data ofBufferedImages
), and any other non-nativeByteBuffers
you have. It'd be useful to know the type of application you have :) (edit: just noticed Tomcat and Spring. I'd go for network communications)