首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到19条相似文献,搜索用时 93 毫秒
1.
基于即时编译器辅助的并行垃圾收集器   总被引:2,自引:0,他引:2       下载免费PDF全文
设计一种基于即时编译器辅助的并行垃圾收集器,在编译阶段利用即时编译器安插显式内存回收指令释放无用对象空间,结合自动和显式内存管理的优点,减轻程序员和垃圾收集器的负担,同时提高内存空间的利用率,支持显式对象回收操作,且可以有效重用这些对象空间,从而提高Java应用程序的执行效率,实验结果表明,该设计方案是可行的。  相似文献   

2.
为了减少Java虚拟机垃圾收集器的开销,对Java栈帧进行改造使其支持对象的存储,在此基础上提出一种基于栈式内存分配的垃圾收集算法。算法首先在编译阶段通过对Java源代码进行分析确定栈式分配对象,并用扩展指令标识这些对象,程序运行时它们直接被分配到Java栈上,这些对象在程序离开其作用域时立即被释放,其它对象则分配到堆上,由垃圾收集器进行回收。实验结果表明,与传统基于堆式的垃圾收集算法相比,新算法内存分配和即时回收性能优,占用内存空间少,垃圾回收更及时,减轻了垃圾收集器的负担,提高了运行速度。  相似文献   

3.
为了减少Java虚拟机垃圾收集器的开销,对Java栈帧进行改造使其支持对象的存储,在此基础上提出一种基于栈式内存分配的垃圾收集算法。算法首先在编译阶段通过对Java源代码进行分析确定栈式分配对象,并用扩展指令标识这些对象,程序运行时它们直接被分配到Java栈上,这些对象在程序离开其作用域时立即被释放,其它对象则分配到堆上,由垃圾收集器进行回收。实验结果表明,与传统基于堆式的垃圾收集算法相比,新算法内存分配和即时回收性能优,占用内存空间少。垃圾回收更及时,减轻了垃圾收集器的负担,提高了运行速度。  相似文献   

4.
本文分析了JVM垃圾收集器所使用的多种收集算法,讨论如何通过命令行参数和终止化方法,透视JAVA自动垃圾收集器的运行,以理解JVM垃圾自动回收机制.程序开发人员应当使用finalize方法明确释放对象资源,并通过GC请求JVM执行垃圾收集,使得JVM尽可能多地回收内存供程序使用.  相似文献   

5.
非增量式Java虚拟机(JVM)垃圾回收算法的内存开销较大。为此,提出一种基于栈式分配策略的JVM增量式垃圾收集算法。对Java栈帧进行改造使其支持存储对象,改进增量式收集器中堆空间的划分、引用跟踪方式,以减少垃圾收集带来的不确定性暂停。实验结果表明,该算法能有效减少暂停的频率和时长,提高运行速度。  相似文献   

6.
为提高堆空间的利用率,许多垃圾收集器在标记扫描对象后加入"压缩"过程,主要有"标记-压缩"和"拷贝"两类垃圾收集器.垃圾收集时需要暂停程序的运行,为了减少这种时间开销,基于"拷贝"算法,垃圾收集器CCone在一次堆遍历中完成压缩过程和引用更新过程,而现有的算法至少需要两遍.此外,CCone基于"拷贝"算法充分利用多核和多线程技术,以页为单位,利用多线程启动多个垃圾收集器对堆空间进行垃圾回收.性能测试表明并行的CCone相比较传统的压缩垃圾收集器在吞吐量上有超过10%的提升,而由算法带来的开销可以忽略不计.  相似文献   

7.
本文面向三维引擎的上层内存管理,提出了一种基于垃圾回收算法的管理系统,辅助三维引擎使用者回收循环引用的内存.该系统基于由库的形式提供,并且不需要用户修改现有代码.用户只需要使用系统提供的接口创建对象,系统就能够在必要时自动回收内存.测试表明,本系统在可接受的开销下实现了循环引用内存的回收.  相似文献   

8.
Java虚拟机中无用单元的精确回收   总被引:1,自引:0,他引:1  
丁宇新  程虎 《计算机学报》1999,22(11):1228-1232
保守无用单元回收算法由于没有考虑内存单元的类型而导致大量的无用单元无法回收,该文结合Java虚拟机的特点提出了对象空间的优化存储结构,内存单元数据类型的标记算法,优化存储结构将对象引用域与基本域分开存放,加快了垃圾回收程序扫描对象空间的速率。内存单元数据类型和标记算法采用静态变量标记与动态变量蹲点的方法,较好地解决了变量数据类型的控制点依赖与控制路径依赖,为无用单元的精确回收奠定了基础,该文并就增  相似文献   

9.
Java语言中,内存空间的回收工作由垃圾收集器(GarbageCollector,GC)完成,这种方法减少了应用程序中发生内存泄露的可能性,但GC的工作机制并不完善,仍然存在内存泄露问题。本文针对此问题进行研究分析,并指出了问题产生的原因和改进的方法。  相似文献   

10.
卫昆 《程序员》2005,(6):108-112
面对日益复杂的企业应用,建立功能完善且扩展性强的框架可以有效地加速系统开发,降低开饭成本,而在这个框架中处于自动资源回收管理地位的垃圾收集器更是已被人们证明可以有效降低编程错误的重要基础设施。作为一种动态存储管理技术,它自动地销毁一些不再被系统引用的对象,并且按照特定的垃圾收集算法来实现对废弃资源的回收和销毁。本文作者就从一个具体的例子入手,向大家介绍了有关垃圾收集器设计的方方面面。  相似文献   

11.
Programming and Computer Software - This paper discusses thread-local garbage collection (GC), a technique of automatic memory management aimed at improving GC throughput and reducing GC pauses in...  相似文献   

12.
Benjamin Zorn 《Software》1993,23(7):733-756
Because dynamic memory management is an important part of a large class of computer programs, high-performance algorithms for dynamic memory management have been, and will continue to be, of considerable interest. Experience indicates that for many programs, dynamic storage allocation is so important that programmers feel compelled to write and use their own domain-specific allocators to avoid the overhead of system libraries. As an alternative to explicit storage management techniques, conservative garbage collection has been suggested as an important algorithm for dynamic storage management in C programs. In this paper, I evaluate the costs of different dynamic storage management algorithms, including domain-specific allocators, widely-used general-purpose allocators, and a publicly available conservative garbage collection algorithm. Surprisingly, I find that programmer enhancements often have little effect on program performance. I also find that the true cost of conservative garbage collection is not the CPU overhead, but the memory system overhead of the algorithm. I conclude that conservative garbage collection is a promising alternative to explicit storage management and that the performance of conservative collection is likely to improve in the future. C programmers should now seriously consider using conservative garbage collection instead of explicitly calling free in programs they write.  相似文献   

13.
One major problem of using Java in real-time and embedded devices is the non-deterministic turnaround time of dynamic memory management systems (memory allocation and garbage collection). For the allocation, the non-determinism is often contributed by the time to perform searching, splitting, and coalescing. For the garbage collection, the turnaround time is usually determined by the size of the heap, the number of live objects, the number of object collected, and the amount of garbage collected. Even with the current state-of-the-art garbage collectors (generational and incremental schemes), they may or may not guarantee the worst-case latency. Moreover, such schemes often prolong overall garbage collection time.

In this paper, the performance analysis of the proposed Active Memory Module (AMM) for embedded systems is presented. Unlike the software counterparts, the AMM can perform a memory allocation in a predictable and bounded fashion (14 cycles). Moreover, it can also yield a bounded sweeping time regardless of the number of live objects or heap size. By utilizing the proposed system, the overall speedup can be as high as 23% compared to the garbage collection system of the JDK 1.2.2 running in classic mode.  相似文献   


14.
SystemJ is a programming language based on the Globally Asynchronous Locally Synchronous (GALS) Model of Computation (MoC) used to design safety critical hard real-time systems. SystemJ uses the Java programming language as the “host” language, for carrying out data computations, because Java provides clearly defined operational semantics, type and memory safety in the form of the Garbage Collector(GC), which help with formal functional verification. The same GC, which helps in functional verification, makes Worst Case Reaction Time (WCRT)1 analysis challenging. Any WCRT analysis framework for GALS programs needs to consider the operations performed by the host language. It has been shown that the worst case time estimates for garbage collection cycles are in seconds, whereas the program’s WCRT itself is in micro-seconds. These pessimistic estimates render the WCRT analysis framework ineffective. In order to overcome this problem, we develop a compiler assisted memory management technique for applications written in SystemJ. The SystemJ MoC plays the central role in the proposed technique. The SystemJ MoC allows clearly demarcating the state boundaries of the program, which in turn allows us to partition the heap, at compile time, into two distinct areas: (1) the memory area called the permanent heap, which holds objects that are alive throughout the life time of the application, and (2) the memory area used to hold all other objects, called the transient heap. The size of these memory areas are bounded statically. Furthermore, the memory allocation and reclaim procedures are simple load and pointer reset operations, respectively, which are guaranteed to complete within a bounded number of clock-cycles, thereby alleviating the need for large pessimistic WCRT bounds obtained due to the GC. Experimental results also show that the proposed approach is approximately three times faster, in terms of memory allocation times as compared to standard real-time GC approaches.  相似文献   

15.
We consider garbage collection (GC) in dynamic, multiprocessor real-time systems. We consider the time-based, concurrent GC approach and focus on real-time scheduling to obtain mutator timing assurances, despite memory allocation and garbage collection. We present a scheduling algorithm called GCMUA. The algorithm considers mutator activities that are subject to time/utility function time constraints, stochastic execution-time and memory demands, and overloads. We establish that GCMUA probabilistically lower bounds each mutator activity's accrued utility, lower bounds the system-wide total accrued utility, and upper bounds the timing assurances' sensitivity to variations in mutator execution-time and memory demand estimates. Our simulation experiments validate our analytical results and confirm GCMUA's effectiveness.  相似文献   

16.
内存泄漏是软件开发过程中最令人棘手的问题之一。通常,使用垃圾收集机制自动进行内存管理,以减轻程序员的负担。通过研究智能指针以及现有垃圾收集机制的工作原理,本文首先设计出一个基于c++智能指针的垃圾收集器。实验结果表明,该垃圾收集器不仅满足了应用程序的要求,且具有良好的可扩展性。对于使用c++等保守式程序设计语言进行大型软件的开发而言,该垃圾收集器具有一定的理论价值和实用价值。  相似文献   

17.
.NET Framework中的垃圾回收(Garbage Collection)机制减少了一些应用程序中发生内存泄露和访问冲突的可能性,但GC的工作机制仍然存在问题。在程序开发中,总会发现对于GC的错误理解。文章针对此问题进行研究分析,简要说明内存垃圾的产生原因、垃圾回收机制的原理、垃圾回收的主要对象以及释放模式。  相似文献   

18.
Automatic memory management and the hiding of the notion of pointers are the prominent features of symbolic processing languages. They make programming easy and guarantee the safety of memory references. For the memory management of linked data structures, copying garbage collection is most widely used because of its simplicity and desirable properties. However, if certain properties about runtime storage allocation and the behavior of pointers can be obtaind by static analysis, a compiler may be able to generate object code closer to that of procedural programs. In the fields of parallel, distributed and real-time computation, it is highly desirable to be able to identify data structures in a program that can be managed without using garbage collection. To this end, this paper proposes a framework of linearity analysis for a concurrent logic language Moded Flat GHC, and proves its basic property. The purpose of linearity analysis is to distinguish between fragments of data structures that may be referenced by two or more pointers and those that cannot be referenced by two or more pointers. Data structures with only one reader are amenable to compile-time garbage collection or local reuse. The proposed framework of linearity analysis is constraint-based and involves both equality and implicational constraints. It has been implemented as part of klint v2, a static analyzer for KL1 programs.  相似文献   

19.
由Java语言与C/C++对象在内存管理方式的不同,引出了Java语言的优势技术--垃圾处理技术.通过对GC工作原理的阐述及对一些传统的垃圾收集器的分析,提出了一种新的垃圾处理算法,一定程度上改善和提高了Java垃圾处理的性能.  相似文献   

设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号