Memory Leak Detection with Context Awareness

Size: px
Start display at page:

Download "Memory Leak Detection with Context Awareness"

Transcription

1 Memory Leak Detection with Context Awareness Woosup Lim Quality Assurance Division Altibase Ltd. Seoul , Korea Seongsoo Park Department of Computer Engineering Sungkyunkwan University Suwon , Korea Hwansoo Han Department of Computer Engineering Sungkyunkwan University Suwon , Korea ABSTRACT Embedded applications with a long running life time particularly require a high degree of reliability. Many types of weaknesses residing in software can reduce the reliability, but memory leaks are prominent sources of software weaknesses for long running applications. As memory leaks are typically cumbersome and illusive, finding their sources demands programmers to make a huge effort even with fairly automated memory leak detection tools. Recently, dynamic detectors with light overheads have been emerged. They use sampling-based techniques to reduce overheads. According to the frequencies of code executions and data accesses, the memory monitor adaptively controls the sampling periods. The accuracies of existing sampling techniques are, however, unsatisfactory in some cases. In this paper, we present a more accurate memory leak detection technique, which takes advantage of context information. Our memory leak detector, which is also based on data sampling, adopts a notion of context (or call path) to sort out dynamically allocated memories and more accurately tracks the sources of memory leaks in the source code. Our experiments with SPEC CINT2000 benchmarks show our technique finds more memory leaks by up to 72% with comparable overheads to the existing data sampling technique. Categories and Subject Descriptors D.3.4 [Programming Languages]: Processors Memory management; D.2.5 [Software Engineering]: Testing and Debugging Tracing General Terms Reliability, Management, Languages. The work was done while he was a graduate student at Sungkyunkwan University. Corresponding author: hhan@skku.edu Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. RACS 12 October 23-26, 2012, San Antonio, TX, USA. Copyright 2012 ACM /12/10...$ Keywords Memory leak detection, context-awareness, dynamic sampling. 1. INTRODUCTION Detecting and fixing faults in a program is a difficult work for programmers, as it takes an increasingly large portion of time and demands a meticulous efforts during the software development cycle. To build a reliable applications, programmers have to try their best to eliminate faults in the program, since even small software faults can lead to critical system failures. Memory leaks are well-known sources of software faults. Detecting memory leaks are often very difficult. They are caused by delicate mistakes of programmers and are rarely detected by general purpose debugging tools, such as gdb. Programmers usually find these faults by using additional tools, such as Valgrind [7], which typically incurs high overheads and forces developers to spend many hours in testing large software products. To detect memory leaks efficiently, researchers investigated sampling techniques in memory leak detection. Particularly, the data sampling proposed by Novark and Zorn [4] avoids the use of the dynamic instrumentation. This results in quite a runtime overhead reduction, but this technique omits some information needed for memory leak detections and consequently fails to report some of memory leaks. In this paper, we design a novel technique called context-aware data sampling. While the traditional data sampling allocates memory objects depending on their allocation sites [4], we allocate memory objects according to their contexts (callpaths of the allocation sites). With this extension, we can more accurately locate objects with potentially similar behaviors in the same page and minimize the loss of information needed for memory leak detection. To experimentally verify our technique, we implemented a memory leak detector applied to SPEC CINT2000 benchmarks [6]. According to our experimental results, our memory leak detector finds more memory leaks by up to about 2.5% than the existing data sampling technique. In addition, we also find that the size of inactive page list makes a rather large impact on the accuracy. The more inactive pages we can accommodate, the more accurate detections we can report. Thus, we add a knob to allow unlimited numbers of inactive pages and find that 72% more memory leaks can be detected than the traditional data sampling with a slight increase in execution time. The two main contributions of this paper are: Our technique enhances the accuracy of the staleness 276

2 information. In our allocation routine, we separately place objects according to their contexts. This is a key to increase the accuracy even if we are using the sampling technique to collect data access information. Our technique allows programmers to find more detailed information on where the leaking objects are originated from. Since we maintain the call path of each allocated object not just allocation site, the information can deliver more exact context where memory leaks occur. In Section 2, we discuss the background on memory leak detection techniques. In Section 3, we present our contextaware memory leak detection technique in detail. Finally, we present our experimental results and conclude our paper. 2. BACKGROUND 2.1 Code Sampling Bursty tracing [1] alternatively executes between checking code and instrumented code as shown in Figure 1. Checking code and instrumented code basically have the same functionality, but the former just counts how many times the procedure is executed and the latter collects the memory access information through the instrumentation. When the procedure enters from the outside or iterates repeatedly, it checks the previous sampling history and decides which code (checking code or instrumented code) should be executed. Since it runs the instrumented code with the predetermined sampling rate, bursty tracing shows lower overheads than always running instrumented code. Code sampling [3] is based on bursty tracing, but extends it by determining the sampling rates with the consideration of execution frequencies. If a procedure is executed frequently enough, we can sample the memory access information with a low sampling rate within the procedure. On the other hand, if the procedure is executed less frequently, we need to use a high sampling rate within the procedure. By adaptively controlling the sampling rate per procedure, the code sampling can achieve the even sampling rates across all procedures regardless of the execution frequencies of the procedures. Code sampling has a potential drawback to report many false positives. For example, when a procedure is sampled with 1% sampling rate, its instrumented code is executed once out of 100 runs. If a memory object is accessed mostly in the non-instrumented runs and not accessed in the instrumented run, code sampling will conclude that the memory object is not accessed at all. Thus, this is reported as a memory leak which is actually a false positive. 2.2 Data Sampling Data sampling [4] can partially remedy the problem of code sampling. Data sampling does not use dynamic instrumentation that incurs high overheads as in code sampling. Instead, it uses the mprotect system call provided by the operating systems and collects the memory access information via page fault mechanism. Page fault handlers surely have some overheads but they are much less than dynamic instrumentation. One drawback of data sampling is that it detects memory leaks in a rather large granularity. Since it uses the page fault mechanism to detect memory accesses, all the memory objects within one page are reported as a whole Figure 1: Code sampling and bursty tracing whether they are memory leaks or not. To enhance the accuracy of detection, the objects with similar access patterns should be enclosed in the same page. Since the memory allocated by the same allocation site has a similar life and action [10], data sampling allocates objects from the same allocation site at the same page. Still, leaking objects and normal objects can be intermingled into one page. Further enhancement in data sampling is to use temporal similarity among objects. The objects created around a similar time are allocated at the same page. The key insight of data sampling is that leaking objects are, by definition, not reclaimed for a long period of time without accesses. As a program proceeds its execution, leaking objects become older and older (staler and staler), meaning the time continues to elapse since the last access. To reflect the aging phenomenon of leaking objects, data sampling inserts the page with all slots full into the aging queue. The pages in the aging queue are divided into two groups: active list and inactive list. When a page becomes a part of an inactive list, this page is protected for read/write operations and tracked for the staleness information. When a page in the inactive list is accessed, the SIGSEGV signal for this page is delivered. In the page fault handler, this page is put back into the active list. Data sampling has two drawbacks. First, distinguishing objects only with their allocation sites does not provide enough accuracy to separate objects with similar access patterns. In SPEC CINT2000 benchmarks, there are many programs whose number of allocation sites are less than or equal to two. In such cases, the basic assumption that the objects allocated by the same allocation site have similar life and action can become incorrect. Second, excessive restriction on the size of inactive list can incur a large number of false negatives. With a limited number of inactive pages, data sampling only reports memory leaks for the objects within the inactive list. As a consequence, many objects outside the inactive list are not monitored properly. According to our experiments, the number of detected memory leaks are about 72% less than with the unlimited active list. 3. CONTEXT-AWARE MEMORY LEAK DE- TECTION 3.1 Allocation and deallocation call paths 277

3 (a) Source of Example (b) A Callgraph of Example Figure 2: Example of allocation call paths and deallocation call paths In small programs, malloc and free are directly called for allocation and deallocation, but in large-scale, well-structured programs, malloc and free are called through several levels of wrapping functions as shown in Figure 2(a). In such cases, the path where an allocation takes place and the path where a deallocation takes place exist separately. We will call them allocation call path and deallocation call path, respectively. For example, Figure 2(b) has an allocation call path starting from Build_tbl_array to Build_table, and finally to malloc. It also has an deallocation call path starting from Free_tbl_array to Free_table, and finally to free. Particularly, if a common data structure is used as in Figure 2, this pattern is more noticeable. The structure of this program is more prone to memory leaks around Free_tbl_array function than around free function. Missing free in Free_table is highly unlikely. On the other hand, the developer of Task1 function is more likely to omit, by mistake, the call of Free_tbl_array function at the end. Task1 function is the place where allocation call paths and deallocation call paths diverge for the first time in the call graph. Thus, this is the function where memory leaks are highly likely to occur. If we consider such a case, reporting the allocation sites, which is the very end of the allocation call path, is not enough to tell the actual memory leak situation. The allocation call paths we report are more exact information on how memory leaks are occurred. To achieve this in our detector, we separately allocate objects in different pages according to the allocation call paths. By adopting call paths, the accuracy of our memory leak detector becomes better, as leak objects and normal objects tend to be separated into different pages even if they share the same allocation site. 3.2 Allocation-call-path segregated heap According to a previous study [10], objects allocated from the same allocation site show similar life time and behaviors. That means the objects allocated from the same allocation site will have a similar staleness information. Thus, the staleness information on objects is believed to be maintained and tracked by the page granularity. However, as shown in the previous section, a heterogeneous page occurs. A heterogenous page is the page which contains objects with different life time, behavior and, as a consequence, different staleness information. To handle this problem, we consider the contexts with allocation call paths. If allocation call paths are considered in building the heap for dynamically allocated data, memory objects in the same page will have more similar life time and behavior, and the accuracy of staleness information, which is maintained per page basis, will be much higher. If we build a segregated heap where objects with the same allocation call path are allocated to the same page, we can obtain two advantages as follows. First, more accurate staleness information is given. Techniques, which rely on staleness to determine memory leaks, implement various mechanisms to collect staleness information. Ultimately, accurate staleness information in such techniques leads to more accurate memory leak detection. Our memory allocation policy based on allocation call paths tends to allocate leaking objects and normal objects to different pages with more accuracy. Thus, the objects in a page are more homogeneous in their behaviors and the staleness information for the page are more accurate for all objects inside the page. Second, more detailed report is provided. When reporting leaks, data sampling reports only the allocation site. As seen in Section 2.2, a program, where allocation sites are not diverse, requires more context information than only the allocation site. Since our memory allocation policy differentiates call paths to a certain level, it can provide detailed call path information without much additional overhead. In addition, when additional memory is used, we can report entire call paths. This helps programmers find the exact points of the source code where memory leaks occur. 3.3 Depths of call paths When we separate memory objects according to allocation call paths, we need to decide an appropriate depth of call paths that can distinguish diverse enough contexts. In Figure 2, Task1 is the function where an allocation call path and a deallocation call path begin to diverge. To approximately recognize such functions in large, complex applications, we inspect source code to count the numbers of allocation sites where malloc functions are directly called. In the call graph, 278

4 Table 1: Numbers of allocation sites and call sites alloc sites call sites level 1 level 2 level 3 level 4 level 5 gzip vpr gcc mcf crafty parser gap vortex bzip twolf we assume the allocation sites are level 1 and the function call sites that invoke the functions containing level 1 sites are level 2. We continually increase the levels of call sites in a similar way. From the level 2 and above, the number of call sites are the maximum number among the numbers of different call sites that call the same function at the right below level. Table 1 summarizes the count of call sites at each level for SPEC CINT2000 benchmarks [6]. For parser, 76 malloc allocation sites exist and in this benchmark 76 functions contain one allocation site each. One function out of 76 are called 6 different call sites and this is the maximum, which means the other 75 functions are called at 6 or below call sites. By inspecting upwards from the level 1, we find the level where the number of call sites increases sharply and decreases again sharply. By containing this level in the call paths, we can distinguish diverse contexts if exist. Four programs in Table 1 vpr, parser, vortex, andtwolf display such behaviors. If we make the depth of the call path set to three, we can include functions with diverse contexts. Some programs may not display such patterns. As for gcc, the number of call sites sharply increases at level 2 and 5. This implies we may need longer call paths to distinguish enough contexts. Actually, one function at level 4 is called 186 different call sites at level 5 and the rest of the level 4 functions are called 2 11 different call sites at level 5. If we increase the depth of call paths, the space requirement of our technique increase as much. Thus, we decide to set the depth to three which at least capture the diversity at level 2 for gcc. As for gzip, mcf, crafty, gap, and bzip2, not much diversity can be found through the all levels. These programs use malloc to allocate a large memory space and manage the memory within the allocated space in a regimented fashion. Otherwise, not many dynamic memory allocation activities exist by its nature. 3.4 Tracking staleness Figure 3 shows a state transition for a page from its creation to inactive and active status, and a state determined to leak status. Pages in active state are deleted from the active list and inserted into the inactive list every predetermined period of time. Pages in the inactive list are protected from accesses by using mprotect. Pages in inactive state stay in the list and checked whether they are continually used. If we access these pages, SIGSEGV signals arise and their states are changed to active by inserting them into the active list in the fault handler. Meanwhile, pages in the inactive list are periodically tracked their staleness. If they are not accessed for a long period of time (a predetermined staleness threshold time), these pages are determined to be Figure 3: State transition of a page in leak states and reported to programmers. The original data sampling has a limit on the number of inactive pages to regulate the overhead within a certain level. We allow unlimited number of inactive pages by putting all pages into inactive list periodically. This will cause a slightly more overhead, but can detect more memory leaks. According to our experiment, the overhead was comparable and 78% more memory leaks were found than the original data sampling. 3.5 Reporting memory leaks It is important to report accurate information on memory leaks so that a programmer can find and correct them. As discussed previously, reporting only the allocation site of each memory leak is sometimes not helpful at all. Instead, reporting the call path of each memory leak is much more informative. A programmer can more easily check if memory allocation and deallocation are correctly done in the given call path. This will increase the productivity to fix memory leaks. If the states of pages become leak, objects inside those pages are immediately reported as leaking objects. Additionally, at the end of the program execution, all the pages which contain un-freed memory objects are reported with their final states. Pages in leak state are already reported as leaking objects. Pages in inactive state or active state may contain leaking objects, but not reported which are false negatives. Since we sample data accesses by the page, an access to an object is interpreted as accesses to all the objects in the page. Thus, some objects can be never accessed but not reported as leaking objects, as another object in the same page is accessed. 4. EXPERIMENTS We use SPEC CINT2000 benchmarks to evaluate the performance of DeLeak, our memory leak detection tool. We measure execution times, memory consumptions, and precision and compare with the existing data sampling technique [4]. Additionally, we analyze the impact of the unlimited size of inactive list and explore various staleness parameters. We perform all our experiment on a 2.2GHz dual-core CPU with 3GB of DRAM memory. The reported numbers are out of three runs; median for execution times, max value for memory consumption, and average for precision. 4.1 Performance of DeLeak We measure the execution time and the precision of both 279

5 Figure 4: Runtime overheads of sampling techniques Figure 5: Effect of staleness threshold in DeLeak Table 2: Number of removed deallocation calls gzip vpr gcc vortex twolf level level the original data sampling and DeLeak. For both, we allow them to control the size of inactive list. If the size is not controlled, we add unlimited to its name. Otherwise, limited is added. In the limited versions of both, the sizes are adaptively controlled depending on the estimated overhead [4]. In current implementation, virtual compaction [4] is not applied to purely focus on the impact of heap organization and the parameters in staleness policies. The staleness threshold time is set to 1 second. This means pages in the inactive list are reported as leak state if they are not accessed for 1 second. The active page inspection period is set to 0.2 second. That is all pages in active state are put back to the inactive list every 0.2 second and tracked for the data accesses. Figure 4 shows the normalized execution times to the original programs. For some programs, the execution times are reduced even with the data sampling overheads. Since the heap allocation is altered to have per-allocation-site pages or per-allocationcall-path pages, pool allocation effects help increase the performance. Except vortex, most programs show nearly little overheads. As for vortex, overheads up to 42% occur due to excessive page faults. Particularly, unlimited inactive lists lead to larger overheads, since all pages in inactive list will get page faults when accessed. However, unlimited inactive lists help increase the precision of leak detection. In the next section, we will evaluate the impact of various inspection periods. We can trade-off the overhead of page faults with the accuracy of memory leak detection. Segregated heaps are organized to have pages per allocationsite (data sampling) or per allocation-call-path (DeLeak). Compared to the original memory allocator, some pages may not be fully utilized due to internal fragmentations. According to our measure, vortex and twolf show 23% 47% space overheads. For vortex, data sampling shows bigger overhead. For twolf, DeLeak shows bigger overhead. As for the other programs, space overheads are small enough for both schemes. Since DeLeak disperses objects into more pages according to the allocation call paths, it shows slightly bigger overhead but within a fairly small difference. 4.2 Staleness policy evaluation We inject leaks into the benchmarks by randomly remov- Table 3: Comparison of detected true positives #leaking unlimited limited objects D.S. DeLeak D.S. DeLeak gzip 419,724 79% 81% 14% 27% vortex 4,622,332 92% 94% 4.7% 4.3% ing several deallocation calls at as high levels as possible and make sure applications still run without crash. The numbers of removed deallocation calls are summarized in Table 2. Four programs, mcf, crafty, parser, and bzip2, are excluded in this leak insertion experiment. As the appropriate depths for allocation call paths are level 1 for those programs, our DeLeak is virtually the same as the data sampling. This is why we exclude four benchmarks. The staleness threshold time can affect the memory leak decision, as pages not accessed for the threshold time are reported as leak. Figure 5 shows the percentages of detected memory leaks (true positives) among total actual memory leaks. The percentages of detected leaks generally decrease for long threshold times, though they really depend on the memory usage characteristics. As the threshold time increases, memory objects, which are not accessed near the end of programs, tend to be determined non-leaking objects. The inspection period, which is the interval for putting active pages back to the inactive list, also affects the sampling rates for memory accesses and the overhead of our scheme. The shorter period will result in the more accurate detections, but with the higher overheads. Figure 6(a) shows the changes in execution overheads. By increasing the inspection period, we can reduce the overhead, particularly for vortex. Figure 6(b) shows the percentage of detected memory leaks among the total actual memory leaks, as the inspection period varies. In general, a shorter period should give more accurate results, but the results of gcc are different. Since we detect memory leaks by the unit of page, this still can interfere with the results. To compare the accuracy of DeLeak with the original data sampling, we select two benchmarks, gzip and vortex. For the two, we can distinguish true positives and false positives with data sampling and DeLeak. As the other benchmarks keep too many memory objects allocated until the end of the execution, it is hard to distinguish false positives in data sampling by only investigating allocation sites. Table 3 shows the percentages of detected true positives among the actual memory leak objects for data sampling (D.S.) and our proposed scheme (DeLeak). We measure the percent- 280

6 (a) Normalized execution times (b) Percentage of true positives Figure 6: Effect of active page inspection period in DeLeak ages with unlimited inactive list and with limited inactive list for both schemes. Under the same size policy for inactive list, DeLeak detects 2.5% more memory leaks than data sampling. Since the original data sampling uses the limited size of inactive list, unlimited DeLeak detects 72% more memory leaks than the original, limited data sampling. The percentages of false positives are zero for gzip and nearly zero for vortext for both data sampling and DeLeak. 5. RELATED WORK There are many techniques that detect memory leaks efficiently. Memcheck, a Valgrind based tool, traces unreachable memory objects from monitored pointers, and reports these as memory leaks [7]. This approach can miss memory leaks for the objects that are reachable just as in garbage collection. Another approach is a staleness-based technique. Stale memory objects, which are not accessed for a long time, are reported as memory leaks. Instrumentation of memory accesses are typically required for this approach. To reduce the overheads of instrumentation, sampling techniques are adopted for code sampling [3] and data sampling [4]. Our technique belongs to this category, too. Static analysis is yet another approach to detect memory leaks. Clouseau, a leak detection tool, detects memory leaks by finding violation of ownership constraints [5]. Escape analysis is extended to find memory leaks [11]. By building a program graph from allocations site to deallocation site, memory leaks are analyzed through flows [9]. The last approach is making software leak-tolerant. Even if a program has memory leaks, it never fails during the execution. Cyclic memory allocation prevents memory usage from increasing by preallocating a cyclic buffer per allocation site [8]. Melt [2] and LeakSurvivor [12] isolate and compress stale objects, thereby minimizing the impact of memory leaks. 6. CONCLUSION This paper presents context-aware data sampling. Our key contributions are allocation-call-path segregated heap and analyzing impact on limitation inactive list. We segregate leaking objects from normal objects more precisely by using allocation call path instead of allocation site. Our technique detects much more memory leaks within reasonable overheads by allowing unlimited size of the inactive list. DeLeak, our memory leak detector, is implemented and tested on SPEC CINT2000 benchmarks. We believe our tool can be easily deployed to many server applications and help to increase their reliability. Acknowledgement This research was supported by Korean government (MKE & MCST) under the industry technology development grant ( , SmartTV 2.0 Software Platform) and the research grant from Korea Copyright Commission in REFERENCES [1] M. Arnold and B. Ryder. A framework for reducing the cost of instrumented code. In Proccedings of PLDI 01. ACM, [2] M. D. Bond and K. S. McKinley. Tolerating memory leaks. In Proceedings of OOPSLA 08. ACM, [3] T. M. Chilimbi and M. Hauswirth. Low-overhead memory leak detection using adaptive statistical profiling. In Proceedings of ASPLOS 04. ACM, [4] E. D. B. Gene Novark and B. G. Zorn. Efficiently and precisely locating memory leaks and bloat. In Proceedings of PLDI 09. ACM, [5] D. L. Heine and M. S. Lam. A practical flow-sensitive and context-sensitive c and c++ memory leak detector. In Proceedings of PLDI 03. ACM, [6] J. L. Henning. SPEC CPU2000: Measuring CPU performance in the new millennium. IEEE Computer, pages 28 35, July [7] N. Nethercote and J. Seward. Valgrind: A framework for heavyweight dynamic binary instrumentation. In Proceedings of PLDI 07. ACM, [8] H. H. Nguyen and M. Rinard. Detecting and eliminating memory leaks using cyclic memory allocation. In Proceedings of ISMM 07. ACM, [9] L. P. S. Cherem and R. Rugina. Practical memory leak detection using guarded value-flow analysis. In Proceedings of PLDI 07. ACM, [10] M. L. Seidl and B. G. Zorn. Segregating heap objects by reference behavior and lifetime. In Proceedings of ASPLOS 98. ACM, [11] Y. Xie and A. Aiken. Context- and path-sensitive memory leak detection. In Proceedings of ESEC/FSE 05. ACM, [12] Q. G. Y. Tang and F. Qin. Leaksurvivor: Towards safely tolerating memory leaks for garbage-collected languages. In Proceedings of USENIX 08,

I J C S I E International Science Press

I J C S I E International Science Press Vol. 5, No. 2, December 2014, pp. 53-56 I J C S I E International Science Press Tolerating Memory Leaks at Runtime JITENDER SINGH YADAV, MOHIT YADAV, KIRTI AZAD AND JANPREET SINGH JOLLY CSE B-tech 4th

More information

Effective Memory Protection Using Dynamic Tainting

Effective Memory Protection Using Dynamic Tainting Effective Memory Protection Using Dynamic Tainting James Clause Alessandro Orso (software) and Ioanis Doudalis Milos Prvulovic (hardware) College of Computing Georgia Institute of Technology Supported

More information

HeapMD: Identifying Heap-based Bugs using Anomaly Detection

HeapMD: Identifying Heap-based Bugs using Anomaly Detection HeapMD: Identifying Heap-based Bugs using Anomaly Detection Trishul M. Chilimbi Microsoft Research Redmond, WA trishulc@microsoft.com Vinod Ganapathy University of Wisconsin Madison, WI vg@cs.wisc.edu

More information

Cost Effective Dynamic Program Slicing

Cost Effective Dynamic Program Slicing Cost Effective Dynamic Program Slicing Xiangyu Zhang Rajiv Gupta Department of Computer Science The University of Arizona Tucson, Arizona 87 {xyzhang,gupta}@cs.arizona.edu ABSTRACT Although dynamic program

More information

Aries: Transparent Execution of PA-RISC/HP-UX Applications on IPF/HP-UX

Aries: Transparent Execution of PA-RISC/HP-UX Applications on IPF/HP-UX Aries: Transparent Execution of PA-RISC/HP-UX Applications on IPF/HP-UX Keerthi Bhushan Rajesh K Chaurasia Hewlett-Packard India Software Operations 29, Cunningham Road Bangalore 560 052 India +91-80-2251554

More information

Storage Architecture and Software Support for SLC/MLC Combined Flash Memory

Storage Architecture and Software Support for SLC/MLC Combined Flash Memory Storage Architecture and Software Support for SLC/MLC Combined Flash Memory Soojun Im and Dongkun Shin Sungkyunkwan University Suwon, Korea {lang33, dongkun}@skku.edu ABSTRACT We propose a novel flash

More information

Path-sensitive Memory Leak Detector

Path-sensitive Memory Leak Detector Path-sensitive Memory Leak Detector Yungbum Jung Programming Research Laboratory Seoul National University ROSAEC 2nd Workshop 1 False Alarm from Tar fopen fclose escape 2 Alarm Explanation void foo(){

More information

An Analysis of the Performance Impact of Wrong-Path Memory References on Out-of-Order and Runahead Execution Processors

An Analysis of the Performance Impact of Wrong-Path Memory References on Out-of-Order and Runahead Execution Processors An Analysis of the Performance Impact of Wrong-Path Memory References on Out-of-Order and Runahead Execution Processors Onur Mutlu Hyesoon Kim David N. Armstrong Yale N. Patt High Performance Systems Group

More information

A Disk Head Scheduling Simulator

A Disk Head Scheduling Simulator A Disk Head Scheduling Simulator Steven Robbins Department of Computer Science University of Texas at San Antonio srobbins@cs.utsa.edu Abstract Disk head scheduling is a standard topic in undergraduate

More information

Project 0: Implementing a Hash Table

Project 0: Implementing a Hash Table Project : Implementing a Hash Table CS, Big Data Systems, Spring Goal and Motivation. The goal of Project is to help you refresh basic skills at designing and implementing data structures and algorithms.

More information

Heap Management. Heap Allocation

Heap Management. Heap Allocation Heap Management Heap Allocation A very flexible storage allocation mechanism is heap allocation. Any number of data objects can be allocated and freed in a memory pool, called a heap. Heap allocation is

More information

A Power and Temperature Aware DRAM Architecture

A Power and Temperature Aware DRAM Architecture A Power and Temperature Aware DRAM Architecture Song Liu, Seda Ogrenci Memik, Yu Zhang, and Gokhan Memik Department of Electrical Engineering and Computer Science Northwestern University, Evanston, IL

More information

Garbage Collection (2) Advanced Operating Systems Lecture 9

Garbage Collection (2) Advanced Operating Systems Lecture 9 Garbage Collection (2) Advanced Operating Systems Lecture 9 Lecture Outline Garbage collection Generational algorithms Incremental algorithms Real-time garbage collection Practical factors 2 Object Lifetimes

More information

Dnmaloc: a more secure memory allocator

Dnmaloc: a more secure memory allocator Dnmaloc: a more secure memory allocator 28 September 2005 Yves Younan, Wouter Joosen, Frank Piessens and Hans Van den Eynden DistriNet, Department of Computer Science Katholieke Universiteit Leuven Belgium

More information

Name, Scope, and Binding. Outline [1]

Name, Scope, and Binding. Outline [1] Name, Scope, and Binding In Text: Chapter 3 Outline [1] Variable Binding Storage bindings and lifetime Type bindings Type Checking Scope Lifetime vs. Scope Referencing Environments N. Meng, S. Arthur 2

More information

Plug: Automatically Tolerating Memory Leaks in C and C++ Applications

Plug: Automatically Tolerating Memory Leaks in C and C++ Applications Plug: Automatically Tolerating Memory Leaks in C and C++ Applications Gene Novark Emery D. Berger Dept. of Computer Science University of Massachusetts Amherst Amherst, MA 01003 gnovark@cs.umass.edu, emery@cs.umass.edu

More information

COL862 Programming Assignment-1

COL862 Programming Assignment-1 Submitted By: Rajesh Kedia (214CSZ8383) COL862 Programming Assignment-1 Objective: Understand the power and energy behavior of various benchmarks on different types of x86 based systems. We explore a laptop,

More information

Runtime management. CS Compiler Design. The procedure abstraction. The procedure abstraction. Runtime management. V.

Runtime management. CS Compiler Design. The procedure abstraction. The procedure abstraction. Runtime management. V. Runtime management CS3300 - Compiler Design Runtime management V Krishna Nandivada IIT Madras Copyright c 2001 by Antony L Hosking Permission to make digital or hard copies of part or all of this work

More information

ptop: A Process-level Power Profiling Tool

ptop: A Process-level Power Profiling Tool ptop: A Process-level Power Profiling Tool Thanh Do, Suhib Rawshdeh, and Weisong Shi Wayne State University {thanh, suhib, weisong}@wayne.edu ABSTRACT We solve the problem of estimating the amount of energy

More information

Project 0: Implementing a Hash Table

Project 0: Implementing a Hash Table CS: DATA SYSTEMS Project : Implementing a Hash Table CS, Data Systems, Fall Goal and Motivation. The goal of Project is to help you develop (or refresh) basic skills at designing and implementing data

More information

Automatically Locating software Errors using Interesting Value Mapping Pair (IVMP)

Automatically Locating software Errors using Interesting Value Mapping Pair (IVMP) 71 Automatically Locating software Errors using Interesting Value Mapping Pair (IVMP) Ajai Kumar 1, Anil Kumar 2, Deepti Tak 3, Sonam Pal 4, 1,2 Sr. Lecturer, Krishna Institute of Management & Technology,

More information

DieHard: Memory Error Fault Tolerance in C and C++

DieHard: Memory Error Fault Tolerance in C and C++ DieHard: Memory Error Fault Tolerance in C and C++ Ben Zorn Microsoft Research In collaboration with Emery Berger and Gene Novark, Univ. of Massachusetts Ted Hart, Microsoft Research DieHard: Memory Error

More information

Lecture Notes on Garbage Collection

Lecture Notes on Garbage Collection Lecture Notes on Garbage Collection 15-411: Compiler Design Frank Pfenning Lecture 21 November 4, 2014 These brief notes only contain a short overview, a few pointers to the literature with detailed descriptions,

More information

HeapMD: Identifying Heap-based Bugs using Anomaly Detection

HeapMD: Identifying Heap-based Bugs using Anomaly Detection Published in ASPLOS XII: Proceedings of the Twelfth International Conference on Architectural Support for Programming Languages and Operating Systems, October 2006 HeapMD: Identifying Heap-based Bugs using

More information

Deallocation Mechanisms. User-controlled Deallocation. Automatic Garbage Collection

Deallocation Mechanisms. User-controlled Deallocation. Automatic Garbage Collection Deallocation Mechanisms User-controlled Deallocation Allocating heap space is fairly easy. But how do we deallocate heap memory no longer in use? Sometimes we may never need to deallocate! If heaps objects

More information

Memory Allocator Security

Memory Allocator Security Memory Allocator Security Yves Younan, Wouter Joosen, Frank Piessens and Hans Van den Eynden DistriNet, Department of Computer Science Katholieke Universiteit Leuven Belgium Yves.Younan@cs.kuleuven.ac.be

More information

Region-based Memory Management. Advanced Operating Systems Lecture 10

Region-based Memory Management. Advanced Operating Systems Lecture 10 Region-based Memory Management Advanced Operating Systems Lecture 10 Lecture Outline Rationale Stack-based memory management Region-based memory management Ownership Borrowing Benefits and limitations

More information

Migration Based Page Caching Algorithm for a Hybrid Main Memory of DRAM and PRAM

Migration Based Page Caching Algorithm for a Hybrid Main Memory of DRAM and PRAM Migration Based Page Caching Algorithm for a Hybrid Main Memory of DRAM and PRAM Hyunchul Seok Daejeon, Korea hcseok@core.kaist.ac.kr Youngwoo Park Daejeon, Korea ywpark@core.kaist.ac.kr Kyu Ho Park Deajeon,

More information

A Novel Approach to Explain the Detection of Memory Errors and Execution on Different Application Using Dr Memory.

A Novel Approach to Explain the Detection of Memory Errors and Execution on Different Application Using Dr Memory. A Novel Approach to Explain the Detection of Memory Errors and Execution on Different Application Using Dr Memory. Yashaswini J 1, Tripathi Ashish Ashok 2 1, 2 School of computer science and engineering,

More information

Automatic Selection of Compiler Options Using Non-parametric Inferential Statistics

Automatic Selection of Compiler Options Using Non-parametric Inferential Statistics Automatic Selection of Compiler Options Using Non-parametric Inferential Statistics Masayo Haneda Peter M.W. Knijnenburg Harry A.G. Wijshoff LIACS, Leiden University Motivation An optimal compiler optimization

More information

Write Barrier Removal by Static Analysis

Write Barrier Removal by Static Analysis Write Barrier Removal by Static Analysis Karen Zee and Martin Rinard Laboratory for Computer Science Massachusetts Institute of Technology Cambridge, MA 02139 {kkz, rinard@lcs.mit.edu ABSTRACT We present

More information

Autonomous Garbage Collection: Resolve Memory

Autonomous Garbage Collection: Resolve Memory Autonomous Garbage Collection: Resolve Memory Leaks In Long Running Server Applications Brian Willard willabr@mail.northgrum.com Ophir Frieder ophir@csam.iit.edu Electronics and Systems Integration Division

More information

SOFT 437. Software Performance Analysis. Ch 7&8:Software Measurement and Instrumentation

SOFT 437. Software Performance Analysis. Ch 7&8:Software Measurement and Instrumentation SOFT 437 Software Performance Analysis Ch 7&8: Why do we need data? Data is required to calculate: Software execution model System execution model We assumed that we have required data to calculate these

More information

VMem. By Stewart Lynch.

VMem. By Stewart Lynch. VMem By Stewart Lynch. 1 Contents Introduction... 3 Overview... 4 Getting started... 6 Fragmentation... 7 Virtual Regions... 8 The FSA... 9 Biasing... 10 The Coalesce allocator... 11 Skewing indices...

More information

General Purpose GPU Programming. Advanced Operating Systems Tutorial 7

General Purpose GPU Programming. Advanced Operating Systems Tutorial 7 General Purpose GPU Programming Advanced Operating Systems Tutorial 7 Tutorial Outline Review of lectured material Key points Discussion OpenCL Future directions 2 Review of Lectured Material Heterogeneous

More information

Page Mapping Scheme to Support Secure File Deletion for NANDbased Block Devices

Page Mapping Scheme to Support Secure File Deletion for NANDbased Block Devices Page Mapping Scheme to Support Secure File Deletion for NANDbased Block Devices Ilhoon Shin Seoul National University of Science & Technology ilhoon.shin@snut.ac.kr Abstract As the amount of digitized

More information

Speculative Parallelization Using State Separation and Multiple Value Prediction

Speculative Parallelization Using State Separation and Multiple Value Prediction Speculative Parallelization Using State Separation and Multiple Value Prediction Chen Tian, Min Feng, Rajiv Gupta University of California, CSE Department, Riverside, CA, 92521 {tianc, mfeng, gupta}@cs.ucr.edu

More information

Hierarchical PLABs, CLABs, TLABs in Hotspot

Hierarchical PLABs, CLABs, TLABs in Hotspot Hierarchical s, CLABs, s in Hotspot Christoph M. Kirsch ck@cs.uni-salzburg.at Hannes Payer hpayer@cs.uni-salzburg.at Harald Röck hroeck@cs.uni-salzburg.at Abstract Thread-local allocation buffers (s) are

More information

Garbage Collection. Akim D le, Etienne Renault, Roland Levillain. May 15, CCMP2 Garbage Collection May 15, / 35

Garbage Collection. Akim D le, Etienne Renault, Roland Levillain. May 15, CCMP2 Garbage Collection May 15, / 35 Garbage Collection Akim Demaille, Etienne Renault, Roland Levillain May 15, 2017 CCMP2 Garbage Collection May 15, 2017 1 / 35 Table of contents 1 Motivations and Definitions 2 Reference Counting Garbage

More information

Performance of Non-Moving Garbage Collectors. Hans-J. Boehm HP Labs

Performance of Non-Moving Garbage Collectors. Hans-J. Boehm HP Labs Performance of Non-Moving Garbage Collectors Hans-J. Boehm HP Labs Why Use (Tracing) Garbage Collection to Reclaim Program Memory? Increasingly common Java, C#, Scheme, Python, ML,... gcc, w3m, emacs,

More information

Chapter 10. Improving the Runtime Type Checker Type-Flow Analysis

Chapter 10. Improving the Runtime Type Checker Type-Flow Analysis 122 Chapter 10 Improving the Runtime Type Checker The runtime overhead of the unoptimized RTC is quite high, because it instruments every use of a memory location in the program and tags every user-defined

More information

The CLOSER: Automating Resource Management in Java

The CLOSER: Automating Resource Management in Java The CLOSER: Automating Resource Management in Java Isil Dillig Thomas Dillig Computer Science Department Stanford University Eran Yahav Satish Chandra IBM T.J. Watson Research Center ISMM 2008 Motivation

More information

APPENDIX Summary of Benchmarks

APPENDIX Summary of Benchmarks 158 APPENDIX Summary of Benchmarks The experimental results presented throughout this thesis use programs from four benchmark suites: Cyclone benchmarks (available from [Cyc]): programs used to evaluate

More information

Short-term Memory for Self-collecting Mutators. Martin Aigner, Andreas Haas, Christoph Kirsch, Ana Sokolova Universität Salzburg

Short-term Memory for Self-collecting Mutators. Martin Aigner, Andreas Haas, Christoph Kirsch, Ana Sokolova Universität Salzburg Short-term Memory for Self-collecting Mutators Martin Aigner, Andreas Haas, Christoph Kirsch, Ana Sokolova Universität Salzburg CHESS Seminar, UC Berkeley, September 2010 Heap Management explicit heap

More information

Run-Time Environments/Garbage Collection

Run-Time Environments/Garbage Collection Run-Time Environments/Garbage Collection Department of Computer Science, Faculty of ICT January 5, 2014 Introduction Compilers need to be aware of the run-time environment in which their compiled programs

More information

Testing & Continuous Integration. Kenneth M. Anderson University of Colorado, Boulder CSCI 5828 Lecture 20 03/19/2010

Testing & Continuous Integration. Kenneth M. Anderson University of Colorado, Boulder CSCI 5828 Lecture 20 03/19/2010 esting & Continuous Integration Kenneth M. Anderson University of Colorado, Boulder CSCI 5828 Lecture 20 03/1/20 University of Colorado, 20 1 Goals 2 Review material from Chapter of Pilone & Miles esting

More information

Embedded Resource Manager (ERM)

Embedded Resource Manager (ERM) Embedded Resource Manager (ERM) The Embedded Resource Manager (ERM) feature allows you to monitor internal system resource utilization for specific resources such as the buffer, memory, and CPU ERM monitors

More information

Run-time Environments - 3

Run-time Environments - 3 Run-time Environments - 3 Y.N. Srikant Computer Science and Automation Indian Institute of Science Bangalore 560 012 NPTEL Course on Principles of Compiler Design Outline of the Lecture n What is run-time

More information

Exploiting the Behavior of Generational Garbage Collector

Exploiting the Behavior of Generational Garbage Collector Exploiting the Behavior of Generational Garbage Collector I. Introduction Zhe Xu, Jia Zhao Garbage collection is a form of automatic memory management. The garbage collector, attempts to reclaim garbage,

More information

Bypassing Memory Leak in Modern C++ Realm

Bypassing Memory Leak in Modern C++ Realm Annales Mathematicae et Informaticae 48 (2018) pp. 43 50 http://ami.uni-eszterhazy.hu Bypassing Memory Leak in Modern C++ Realm Dorottya Papp, Norbert Pataki Dept. of Programming Languages and Compilers,

More information

Advanced Memory Allocation

Advanced Memory Allocation Advanced Memory Allocation Call some useful functions of the GNU C library to save precious memory and to find nasty bugs. by Gianluca Insolvibile Dealing with dynamic memory traditionally has been one

More information

Oracle Developer Studio Code Analyzer

Oracle Developer Studio Code Analyzer Oracle Developer Studio Code Analyzer The Oracle Developer Studio Code Analyzer ensures application reliability and security by detecting application vulnerabilities, including memory leaks and memory

More information

IBM Memory Expansion Technology

IBM Memory Expansion Technology By: Jeromie LaVoie Marist College Computer Architecture 507L256 Instructor: David Meck Note: Jeromie wrote this review paper as his homework IBM is not responsible for it s contents Table Of Contents Title:

More information

Programming Language Implementation

Programming Language Implementation A Practical Introduction to Programming Language Implementation 2014: Week 10 Garbage Collection College of Information Science and Engineering Ritsumeikan University 1 review of last week s topics dynamic

More information

Survivable Software. AFOSR FA , Start Date: David R. Luginbuhl, Ph.D. Program Manager, Systems and Software

Survivable Software. AFOSR FA , Start Date: David R. Luginbuhl, Ph.D. Program Manager, Systems and Software Survivable Software AFOSR FA0550-09-1-0481, Start Date: 6-1-09 David R. Luginbuhl, Ph.D. Program Manager, Systems and Software Radu Grosu, Scott A. Smolka, Scott D. Stoller, Erez Zadok Stony Brook University

More information

Run-time Environments -Part 3

Run-time Environments -Part 3 Run-time Environments -Part 3 Y.N. Srikant Computer Science and Automation Indian Institute of Science Bangalore 560 012 NPTEL Course on Compiler Design Outline of the Lecture Part 3 What is run-time support?

More information

Memory management has always involved tradeoffs between numerous optimization possibilities: Schemes to manage problem fall into roughly two camps

Memory management has always involved tradeoffs between numerous optimization possibilities: Schemes to manage problem fall into roughly two camps Garbage Collection Garbage collection makes memory management easier for programmers by automatically reclaiming unused memory. The garbage collector in the CLR makes tradeoffs to assure reasonable performance

More information

Accuracy Enhancement by Selective Use of Branch History in Embedded Processor

Accuracy Enhancement by Selective Use of Branch History in Embedded Processor Accuracy Enhancement by Selective Use of Branch History in Embedded Processor Jong Wook Kwak 1, Seong Tae Jhang 2, and Chu Shik Jhon 1 1 Department of Electrical Engineering and Computer Science, Seoul

More information

Exterminator: Automatically Correcting Memory Errors with High Probability By Gene Novark, Emery D. Berger, and Benjamin G. Zorn

Exterminator: Automatically Correcting Memory Errors with High Probability By Gene Novark, Emery D. Berger, and Benjamin G. Zorn Exterminator: Automatically Correcting Memory Errors with High Probability By Gene Novark, Emery D. Berger, and Benjamin G. Zorn doi:0.45/409360.40938 Abstract Programs written in C and C++ are susceptible

More information

Parallels Virtuozzo Containers

Parallels Virtuozzo Containers Parallels Virtuozzo Containers White Paper Parallels Virtuozzo Containers for Windows Capacity and Scaling www.parallels.com Version 1.0 Table of Contents Introduction... 3 Resources and bottlenecks...

More information

Adaptive Memory Allocations in Clusters to Handle Unexpectedly Large Data-Intensive Jobs

Adaptive Memory Allocations in Clusters to Handle Unexpectedly Large Data-Intensive Jobs IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS, VOL. 15, NO. 7, JULY 2004 577 Adaptive Memory Allocations in Clusters to Handle Unexpectedly Large Data-Intensive Jobs Li Xiao, Member, IEEE Computer

More information

Recall: Address Space Map. 13: Memory Management. Let s be reasonable. Processes Address Space. Send it to disk. Freeing up System Memory

Recall: Address Space Map. 13: Memory Management. Let s be reasonable. Processes Address Space. Send it to disk. Freeing up System Memory Recall: Address Space Map 13: Memory Management Biggest Virtual Address Stack (Space for local variables etc. For each nested procedure call) Sometimes Reserved for OS Stack Pointer Last Modified: 6/21/2004

More information

An Efficient Heap Management Technique with Minimum Fragmentation and Auto Compaction

An Efficient Heap Management Technique with Minimum Fragmentation and Auto Compaction An Efficient Heap Management Technique with Minimum Fragmentation and Auto Compaction Krishna Lal. Baishnab, Soumyabrata Dev, Ziaul Haque Choudhury, Amlan Nag klbaishnab@gmail.com, dev.soumyabrata@gmail.com,

More information

Basic Compression Library

Basic Compression Library Basic Compression Library Manual API version 1.2 July 22, 2006 c 2003-2006 Marcus Geelnard Summary This document describes the algorithms used in the Basic Compression Library, and how to use the library

More information

Chapter 12 Wear Leveling for PCM Using Hot Data Identification

Chapter 12 Wear Leveling for PCM Using Hot Data Identification Chapter 12 Wear Leveling for PCM Using Hot Data Identification Inhwan Choi and Dongkun Shin Abstract Phase change memory (PCM) is the best candidate device among next generation random access memory technologies.

More information

Skewed-Associative Caches: CS752 Final Project

Skewed-Associative Caches: CS752 Final Project Skewed-Associative Caches: CS752 Final Project Professor Sohi Corey Halpin Scot Kronenfeld Johannes Zeppenfeld 13 December 2002 Abstract As the gap between microprocessor performance and memory performance

More information

LAST: Locality-Aware Sector Translation for NAND Flash Memory-Based Storage Systems

LAST: Locality-Aware Sector Translation for NAND Flash Memory-Based Storage Systems : Locality-Aware Sector Translation for NAND Flash Memory-Based Storage Systems Sungjin Lee, Dongkun Shin, Young-Jin Kim and Jihong Kim School of Information and Communication Engineering, Sungkyunkwan

More information

General Purpose GPU Programming. Advanced Operating Systems Tutorial 9

General Purpose GPU Programming. Advanced Operating Systems Tutorial 9 General Purpose GPU Programming Advanced Operating Systems Tutorial 9 Tutorial Outline Review of lectured material Key points Discussion OpenCL Future directions 2 Review of Lectured Material Heterogeneous

More information

CS 326: Operating Systems. Process Execution. Lecture 5

CS 326: Operating Systems. Process Execution. Lecture 5 CS 326: Operating Systems Process Execution Lecture 5 Today s Schedule Process Creation Threads Limited Direct Execution Basic Scheduling 2/5/18 CS 326: Operating Systems 2 Today s Schedule Process Creation

More information

Causes of Software Failures

Causes of Software Failures Causes of Software Failures Hardware Faults Permanent faults, e.g., wear-and-tear component Transient faults, e.g., bit flips due to radiation Software Faults (Bugs) (40% failures) Nondeterministic bugs,

More information

ECE 7650 Scalable and Secure Internet Services and Architecture ---- A Systems Perspective. Part I: Operating system overview: Memory Management

ECE 7650 Scalable and Secure Internet Services and Architecture ---- A Systems Perspective. Part I: Operating system overview: Memory Management ECE 7650 Scalable and Secure Internet Services and Architecture ---- A Systems Perspective Part I: Operating system overview: Memory Management 1 Hardware background The role of primary memory Program

More information

!! What is virtual memory and when is it useful? !! What is demand paging? !! When should pages in memory be replaced?

!! What is virtual memory and when is it useful? !! What is demand paging? !! When should pages in memory be replaced? Chapter 10: Virtual Memory Questions? CSCI [4 6] 730 Operating Systems Virtual Memory!! What is virtual memory and when is it useful?!! What is demand paging?!! When should pages in memory be replaced?!!

More information

An Analysis of the Amount of Global Level Redundant Computation in the SPEC 95 and SPEC 2000 Benchmarks

An Analysis of the Amount of Global Level Redundant Computation in the SPEC 95 and SPEC 2000 Benchmarks An Analysis of the Amount of Global Level Redundant Computation in the SPEC 95 and SPEC 2000 s Joshua J. Yi and David J. Lilja Department of Electrical and Computer Engineering Minnesota Supercomputing

More information

Supporting Speculative Parallelization in the Presence of Dynamic Data Structures

Supporting Speculative Parallelization in the Presence of Dynamic Data Structures Supporting Speculative Parallelization in the Presence of Dynamic Data Structures Chen Tian, Min Feng, Rajiv Gupta University of California, CSE Department, Riverside, CA, 92521 {tianc, mfeng, gupta}@cs.ucr.edu

More information

POSH: A TLS Compiler that Exploits Program Structure

POSH: A TLS Compiler that Exploits Program Structure POSH: A TLS Compiler that Exploits Program Structure Wei Liu, James Tuck, Luis Ceze, Wonsun Ahn, Karin Strauss, Jose Renau and Josep Torrellas Department of Computer Science University of Illinois at Urbana-Champaign

More information

Concurrent Manipulation of Dynamic Data Structures in OpenCL

Concurrent Manipulation of Dynamic Data Structures in OpenCL Concurrent Manipulation of Dynamic Data Structures in OpenCL Henk Mulder University of Twente P.O. Box 217, 7500AE Enschede The Netherlands h.mulder-1@student.utwente.nl ABSTRACT With the emergence of

More information

Continuous Object Access Profiling and Optimizations to Overcome the Memory Wall and Bloat

Continuous Object Access Profiling and Optimizations to Overcome the Memory Wall and Bloat Continuous Object Access Profiling and Optimizations to Overcome the Memory Wall and Bloat Rei Odaira, Toshio Nakatani IBM Research Tokyo ASPLOS 2012 March 5, 2012 Many Wasteful Objects Hurt Performance.

More information

Garbage Collection. Weiyuan Li

Garbage Collection. Weiyuan Li Garbage Collection Weiyuan Li Why GC exactly? - Laziness - Performance - free is not free - combats memory fragmentation - More flame wars Basic concepts - Type Safety - Safe: ML, Java (not really) - Unsafe:

More information

Tradeoff between coverage of a Markov prefetcher and memory bandwidth usage

Tradeoff between coverage of a Markov prefetcher and memory bandwidth usage Tradeoff between coverage of a Markov prefetcher and memory bandwidth usage Elec525 Spring 2005 Raj Bandyopadhyay, Mandy Liu, Nico Peña Hypothesis Some modern processors use a prefetching unit at the front-end

More information

Parallel storage allocator

Parallel storage allocator CSE 539 02/7/205 Parallel storage allocator Lecture 9 Scribe: Jing Li Outline of this lecture:. Criteria and definitions 2. Serial storage allocators 3. Parallel storage allocators Criteria and definitions

More information

Short Notes of CS201

Short Notes of CS201 #includes: Short Notes of CS201 The #include directive instructs the preprocessor to read and include a file into a source code file. The file name is typically enclosed with < and > if the file is a system

More information

Memory Management 3/29/14 21:38

Memory Management 3/29/14 21:38 Presentation for use with the textbook Data Structures and Algorithms in Java, 6 th edition, by M. T. Goodrich, R. Tamassia, and M. H. Goldwasser, Wiley, 2014 Memory Management Diagram of a 4 4 plane of

More information

Motivation. Overview. Scalable Dynamic Analysis for Automated Fault Location and Avoidance. Rajiv Gupta. Program Execution

Motivation. Overview. Scalable Dynamic Analysis for Automated Fault Location and Avoidance. Rajiv Gupta. Program Execution Motivation Scalable Dynamic Analysis for Automated Fault Location and Avoidance Rajiv Gupta Funded by NSF grants from CPA, CSR, & CRI programs and grants from Microsoft Research Software bugs cost the

More information

:.NET Won t Slow You Down

:.NET Won t Slow You Down :.NET Won t Slow You Down Presented by: Kirk Fertitta Chief Technical Officer Pacific MindWorks MEMORY MANAGEMENT Techniques for managing application program memory have always involved tradeoffs between

More information

Virtual Memory. Chapter 8

Virtual Memory. Chapter 8 Virtual Memory 1 Chapter 8 Characteristics of Paging and Segmentation Memory references are dynamically translated into physical addresses at run time E.g., process may be swapped in and out of main memory

More information

Using Cyclic Memory Allocation to Eliminate Memory Leaks

Using Cyclic Memory Allocation to Eliminate Memory Leaks Using Cyclic Memory Allocation to Eliminate Memory Leaks Huu Hai NGUYEN 1 and Martin RINARD 2 1 Singapore-MIT Alliance, National University of Singapore 2 CSAIL, Massachusetts Institute of Technology Abstract

More information

Bugs in Deployed Software

Bugs in Deployed Software Bell: Bit-Encoding Online Memory Leak Detection Michael D. Bond Kathryn S. McKinley University of Texas at Austin Bugs in Deployed Software Humans rely on software for critical tasks Bugs are costly &

More information

CS201 - Introduction to Programming Glossary By

CS201 - Introduction to Programming Glossary By CS201 - Introduction to Programming Glossary By #include : The #include directive instructs the preprocessor to read and include a file into a source code file. The file name is typically enclosed with

More information

TraceBack: First Fault Diagnosis by Reconstruction of Distributed Control Flow

TraceBack: First Fault Diagnosis by Reconstruction of Distributed Control Flow TraceBack: First Fault Diagnosis by Reconstruction of Distributed Control Flow Andrew Ayers Chris Metcalf Junghwan Rhee Richard Schooler VERITAS Emmett Witchel Microsoft Anant Agarwal UT Austin MIT Software

More information

Computer Sciences Department

Computer Sciences Department Computer Sciences Department SIP: Speculative Insertion Policy for High Performance Caching Hongil Yoon Tan Zhang Mikko H. Lipasti Technical Report #1676 June 2010 SIP: Speculative Insertion Policy for

More information

Space Efficient Conservative Garbage Collection

Space Efficient Conservative Garbage Collection RETROSPECTIVE: Space Efficient Conservative Garbage Collection Hans-J. Boehm HP Laboratories 1501 Page Mill Rd. MS 1138 Palo Alto, CA, 94304, USA Hans.Boehm@hp.com ABSTRACT Both type-accurate and conservative

More information

Compiler Construction

Compiler Construction Compiler Construction Lecture 18: Code Generation V (Implementation of Dynamic Data Structures) Thomas Noll Lehrstuhl für Informatik 2 (Software Modeling and Verification) noll@cs.rwth-aachen.de http://moves.rwth-aachen.de/teaching/ss-14/cc14/

More information

Garbage Collection (1)

Garbage Collection (1) Garbage Collection (1) Advanced Operating Systems Lecture 7 This work is licensed under the Creative Commons Attribution-NoDerivatives 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nd/4.0/

More information

WHITE PAPER Application Performance Management. The Case for Adaptive Instrumentation in J2EE Environments

WHITE PAPER Application Performance Management. The Case for Adaptive Instrumentation in J2EE Environments WHITE PAPER Application Performance Management The Case for Adaptive Instrumentation in J2EE Environments Why Adaptive Instrumentation?... 3 Discovering Performance Problems... 3 The adaptive approach...

More information

Improving memory management security for C and C++

Improving memory management security for C and C++ Improving memory management security for C and C++ Yves Younan, Wouter Joosen, Frank Piessens, Hans Van den Eynden DistriNet, Katholieke Universiteit Leuven, Belgium Abstract Memory managers are an important

More information

First-Aid: Surviving and Preventing Memory Management Bugs during Production Runs

First-Aid: Surviving and Preventing Memory Management Bugs during Production Runs First-Aid: Surviving and Preventing Memory Management Bugs during Production Runs Qi Gao Wenbin Zhang Yan Tang Feng Qin Dept. of Computer Science and Engineering Ohio State University, Columbus, OH, 43210,

More information

Programming Languages Third Edition. Chapter 10 Control II Procedures and Environments

Programming Languages Third Edition. Chapter 10 Control II Procedures and Environments Programming Languages Third Edition Chapter 10 Control II Procedures and Environments Objectives Understand the nature of procedure definition and activation Understand procedure semantics Learn parameter-passing

More information

CHAPTER 4 PROPOSED ARCHITECTURE FOR INCREMENTAL PARALLEL WEBCRAWLER

CHAPTER 4 PROPOSED ARCHITECTURE FOR INCREMENTAL PARALLEL WEBCRAWLER CHAPTER 4 PROPOSED ARCHITECTURE FOR INCREMENTAL PARALLEL WEBCRAWLER 4.1 INTRODUCTION In 1994, the World Wide Web Worm (WWWW), one of the first web search engines had an index of 110,000 web pages [2] but

More information

Lecture Notes on Garbage Collection

Lecture Notes on Garbage Collection Lecture Notes on Garbage Collection 15-411: Compiler Design André Platzer Lecture 20 1 Introduction In the previous lectures we have considered a programming language C0 with pointers and memory and array

More information

Lightweight Memory Tracing

Lightweight Memory Tracing Lightweight Memory Tracing Mathias Payer*, Enrico Kravina, Thomas Gross Department of Computer Science ETH Zürich, Switzerland * now at UC Berkeley Memory Tracing via Memlets Execute code (memlets) for

More information