scispace - formally typeset
Search or ask a question

Showing papers on "Binary heap published in 2005"


Journal ArticleDOI
12 Jun 2005
TL;DR: Automatic Pool Allocation is described, a transformation framework that segregates distinct instances of heap-based data structures into seperate memory pools and allows heuristics to be used to partially control the internal layout of those data structures.
Abstract: This paper describes Automatic Pool Allocation, a transformation framework that segregates distinct instances of heap-based data structures into seperate memory pools and allows heuristics to be used to partially control the internal layout of those data structures. The primary goal of this work is performance improvement, not automatic memory management, and the paper makes several new contributions. The key contribution is a new compiler algorithm for partitioning heap objects in imperative programs based on a context-sensitive pointer analysis, including a novel strategy for correct handling of indirect (and potentially unsafe) function calls. The transformation does not require type safe programs and works for the full generality of C and C++. Second, the paper describes several optimizations that exploit data structure partitioning to further improve program performance. Third, the paper evaluates how memory hierarchy behavior and overall program performance are impacted by the new transformations. Using a number of benchmarks and a few applications, we find that compilation times are extremely low, and overall running times for heap intensive programs speed up by 10-25% in many cases, about 2x in two cases, and more than 10x in two small benchmarks. Overall, we believe this work provides a new framework for optimizing pointer intensive programs by segregating and controlling the layout of heap-based data structures.

203 citations


Proceedings ArticleDOI
12 Jan 2005
TL;DR: An analysis method is presented that uses a characterization of a procedure's behavior in which parts of the heap not relevant to the procedure are ignored and a new static-analysis algorithm is developed using canonical abstraction.
Abstract: The goal of this work is to develop compile-time algorithms for automatically verifying properties of imperative programs that manipulate dynamically allocated storage. The paper presents an analysis method that uses a characterization of a procedure's behavior in which parts of the heap not relevant to the procedure are ignored. The paper has two main parts: The first part introduces a non-standard concrete semantics, LSL, in which called procedures are only passed parts of the heap. In this semantics, objects are treated specially when they separate the "local heap" that can be mutated by a procedure from the rest of the heap, which---from the viewpoint of that procedure---is non-accessible and immutable. The second part concerns abstract interpretation of LSL and develops a new static-analysis algorithm using canonical abstraction.

125 citations


Book ChapterDOI
04 Apr 2005
TL;DR: A program analysis that can automatically discover the shape of complex pointer data structures that is used to verify the absence of safety errors in the program, or to check whether the program preserves the data consistency.
Abstract: We present a program analysis that can automatically discover the shape of complex pointer data structures. The discovered invariants are, then, used to verify the absence of safety errors in the program, or to check whether the program preserves the data consistency. Our analysis extends the shape analysis of Sagiv et al. with grammar annotations, which can precisely express the shape of complex data structures. We demonstrate the usefulness of our analysis with binomial heap construction and the Schorr-Waite tree traversal. For a binomial heap construction algorithm, our analysis returns a grammar that precisely describes the shape of a binomial heap; for the Schorr-Waite tree traversal, our analysis shows that at the end of the execution, the result is a tree and there are no memory leaks.

79 citations


Book ChapterDOI
22 Aug 2005
TL;DR: An incremental heap canonicalization algorithm that reduces the state space explored by detecting heap symmetries and ensures that for small changes in the heap the resulting canonical representations differ only by relatively small amounts.
Abstract: The most expensive operation in explicit state model checking is the hash computation required to store the explored states in a hash table. One way to reduce this computation is to compute the hash incrementally by only processing those portions of the state that are modified in a transition. This paper presents an incremental heap canonicalization algorithm that aids in such an incremental hash computation. Like existing heap canonicalization algorithms, the incremental algorithm reduces the state space explored by detecting heap symmetries. On the other hand, the algorithm ensures that for small changes in the heap the resulting canonical representations differ only by relatively small amounts. This reduces the amount of hash computation a model checker has to perform after every transition, resulting in significant speedup of state space exploration. This paper describes the algorithm and its implementation in two explicit state model checkers, CMC and Zing.

35 citations


Patent
20 May 2005
TL;DR: In this article, a dynamic analysis tool uses anomaly detection to find heap-based bugs, and the analysis tool computes a suite of metrics which are sensitive to the state of the heap.
Abstract: A dynamic analysis tool uses anomaly detection to find heap-based bugs. In spite of the evolving nature of the heap, programs generally exhibit several of properties of their heap usage that remain stable. Periodically, during the execution of the program, the analysis tool computes a suite of metrics which are sensitive to the state of the heap. These metrics track heap behavior, and the stability of the heap reflects quantitatively in the values of these metrics. The ranges of stable metrics, obtained by running a program on a multiple input training set, are then treated as indicators of correct behavior, and are used in conjunction with an anomaly detector to find heap-based bugs.

28 citations


Book ChapterDOI
TL;DR: This work presents the first snap-stabilizing distributed binary search tree (BST) algorithm that uses a heap algorithm as a preprocessing step and shows a lower bound of Ω(n) on the time complexity for the BST problem.
Abstract: We present the first snap-stabilizing distributed binary search tree (BST) algorithm. A snap-stabilizing algorithm guarantees that the system always behaves according to its specification provided some processor initiated the protocol. The maximum number of items that can be stored at any time at any processor is constant (independent of the size (n) of the network). Under this space constraint, we show a lower bound of Ω(n) on the time complexity for the BST problem. We then prove that starting from an arbitrary configuration where the nodes have distinct internal values drawn from an arbitrary set, our algorithm arranges them in a BST order in O(n) rounds. Therefore, our solution is asymptotically optimal in time and takes O(n) rounds. A processor i requires O(logsi) bits of space where si is the size of the subtree rooted at i. So, the root uses O(logn) bits. The proposed algorithm uses a heap algorithm as a preprocessing step. This is also the first snap-stabilizing distributed solution to the heap problem. The heap construction spends O(h) (where h is the height of the tree) rounds. Its space requirement is constant (independent of n). We then exploit the heap in the next phase of the protocol. The root collects values in decreasing order and delivers them to each node in the tree in O(n) rounds following a pipelined delivery order of sorted values in decreasing order.

21 citations


Patent
Kirk J. Krauss1
09 Dec 2005
TL;DR: In this article, the authors propose a method of detecting inefficient use of virtual memory by an application that is programmed using memory pointers. The method can include selecting a first heap from a list of tracked heaps and identifying allocated memory blocks within the first heap.
Abstract: A method of detecting inefficient use of virtual memory by an application that is programmed using memory pointers. The method can include selecting a first heap from a list of tracked heaps and identifying allocated memory blocks within the first heap. A first total can be determined as a sum of sizes of the identified memory blocks. A second total can be determined as a sum of unallocated, NULL-filled bytes within the first heap that are not located outside outermost memory block addresses in each range of committed memory in the first heap. A ratio of the first total and the second total can be determined, and a memory profile corresponding to the ratio can be generated. A memory profile suggestion also can be generated.

19 citations


Journal ArticleDOI
TL;DR: Prim’s MST outperforms both Kruskal's MST and the two binary searches and the Fibonacci implementation slightly outperforming the other.
Abstract: Power conservation is a critical issue for ad hoc wireless networks. The main objective of the paper is to find the minimum uniform transmission range of an ad hoc wireless network, where each node uses the same transmission power, while maintaining network connectivity. Three different algorithms, Prim's Minimum Spanning Tree (MST), its extension with Fibonacci heap implementation, and an area-based binary search are developed to solve the problem. Their performance is compared by simulation study together with Kruskal's MST, a known solution proposed by Ramanathan and Rosales-Hain for topology control by transmission power adjustment, and an edge-based binary search used by the same study in order to find the per-node-minimality after Kruskal's algorithm is applied. Our results show that Prim's MST outperforms both Kruskal's MST and the two binary searches. The performance between Prim's MST implemented with binary heap and Fibonacci heap is fairly close, with the Fibonacci implementation slightly outperforming the other.

16 citations


Patent
19 Apr 2005
TL;DR: In this article, techniques and tools for analyzing software are described for abstract interpretation with a congruence abstract domain and/or a heap succession abstract domain, where the abstract interpretation tool tracks equivalence classes between alien expressions and base domain variables.
Abstract: Techniques and tools are described for analyzing software. For example, an analysis tool performs abstract interpretation with a congruence abstract domain and/or a heap succession abstract domain. For the congruence abstract domain, the tool tracks equivalence classes between alien expressions and base domain variables. For the heap succession abstract domain, the tool tracks updates to a heap. In either case, to preserve information after updates, the tool may identify an expression having an unreachable value then determine an equivalent expression that lacks the unreachable value.

13 citations


Patent
14 Apr 2005
TL;DR: In this article, a library of functions is provided which are designed to respect the different classes of rules that apply to the different heaps, by storing data only on a heap designated for use with the proper class of data, and by resisting the performance of actions on data in a heap that is inconsistent with the rules applied to the heap.
Abstract: Special purpose heaps are created to store different classes of data to which different rules apply. A library of functions is provided which is designed to respect the different classes of rules that apply to the different heaps, by storing data only on a heap that is designated for use with the proper class of data, and by resisting the performance of actions on data in a heap that is inconsistent with the rules that apply to the heap. The use of plural heaps in this manner discourages programmer error in which an operation is performed on data that is inconsistent with the data, since the programmer would explicitly have to copy data from one heap to the other in order to perform the action. In one example, one heap is designated for the storage of secret data, and another heap is designated for general-purpose (non-secret) data.

9 citations


Patent
30 Mar 2005
TL;DR: In this article, a function library is designed for protecting rules for different classes applied to different heaps, and a plurality of heaps are used to prevent programmer error executing operation violating data on the data.
Abstract: PROBLEM TO BE SOLVED: To generate a special-purpose heap for storing data of different classes subjected to different rules. SOLUTION: When data are stored only in a heap designated to be used with a data class of the data and execution of operation to data, which violate a rule applied to the heap, on the heap is prevented, a function library designed for protecting rules for different classes applied to different heaps is provided. When a plurality of heaps are used, a programmer error executing operation violating data on the data is prevented. This is because a programmer must explicitly copy data from one heap to another for executing its operation. In an example, one heap is designated for storing secret data, while another heap is designated for general purpose (non-secret) data. COPYRIGHT: (C)2006,JPO&NCIPI

Patent
20 Jun 2005
TL;DR: In this article, the authors propose to reduce the file size of an acquired heap dump for detecting a memory leak and clarifying its cause in a program execution environment and applicable to a large-scale system.
Abstract: PROBLEM TO BE SOLVED: To provide a memory leak investigation means capable of reducing a file size of an acquired heap dump for detecting a memory leak and clarifying its cause in a program execution environment and applicable to a large-scale system. SOLUTION: In acquisition of the heap dump, only the object matching the following condition is output among objects inside a heap memory. An existing object (1) among objects newly generated during a designated period. An object (2) allocated on a reference path reaching the object (1) from a route set. COPYRIGHT: (C)2007,JPO&INPIT

01 Jan 2005
TL;DR: This dissertation proposes a new User-level Temporal Intra-Process Protection (UTIPP) mechanism in which a process protects itself from its own vulnerabilities by write-protecting its own heap meta-data, and only removing the protection for legitimate stores in the heap management library.
Abstract: In most current implementations, memory allocations and deallocations are performed by user-level library code which keeps heap meta-data (heap structure information) and the application's heap data stored in an interleaved fashion in the same address space. Such implementations are inherently unsafe: they allow attackers to use application's vulnerabilities (e.g. lack of heap-based buffer overflow checking) to corrupt its heap meta-data in order to execute malicious code or cause denial-of-service. In this dissertation, we propose an approach where heap meta-data and heap data are protected separately. Our first solution exploits existing inter-process protection mechanisms through Heap Server, a separate process that maintains heap meta-data on behalf of the application and runs in parallel with it. To perform memory allocations and deallocations, the application sends requests to the Server, which responds to the requests and updates the meta-data. Since the heap meta-data is kept in the Heap Server's address space, attacks on the application can no longer corrupt it. Heap Server is directly implementable in current systems because it does not require new hardware. To optimize Heap Server's performance, we explore non-blocking communication, bulk deallocation, and pre-allocation optimizations. Evaluated on a real system, a fully-optimized Heap Server performs almost identical to a Base heap management library with no protection mechanisms. As an alternative solution, we propose a new User-level Temporal Intra-Process Protection (UTIPP) mechanism in which a process protects itself from its own vulnerabilities by write-protecting its own heap meta-data, and only removing the protection for legitimate stores in the heap management library. Unlike existing kernel-level page protection which can only be modified in the privileged mode, UTIPP allows a process to modify the new write-protection bit with a single instruction without disrupting normal pipeline flow. Evaluated on a cycle-accurate simulator, UTIPP adds negligible overhead in most benchmarks. Another contribution of this dissertation is a new heap layout obfuscation technique which relies on randomizing the space between heap chunks and the order of chunks in the heap, making heap data attacks more difficult. This obfuscation is integrated with Heap Server and UTIPP.


Proceedings ArticleDOI
10 Oct 2005
TL;DR: A first-in-first-out (FIFO) time-depend shortest path algorithm is discussed for dynamic routing, which adopts the adaptive A* algorithm based on binary heap priority queue and RB-tree.
Abstract: Location based services (LBS) are capturing global spotlights increasingly, in which users tend to pick up navigation service as their favorites This paper examines the dynamic routing problems based on real-time traffic information in LBS At first, the overall structure of dynamic navigation system is illustrated, which is composed of four ingredients: traffic data collection, digital road map, static routing and dynamic re-routing Traffic data collection is the task of traffic information center (TIC), where various sources of data are fused into link travel times that are used as criteria to choose candidates in path determining Digital road map includes digital road network and historical traffic data, where the topology relationship of road network is elementarily explored and the method to represent statistical traffic data is referred to Routing with historical traffic data and dynamic re-routing with live traffic data are two main functions of dynamic navigation service The flow of dynamic re-routing algorithm is exhibited Lastly, a first-in-first-out (FIFO) time-depend shortest path algorithm is discussed for dynamic routing, which adopts the adaptive A* algorithm based on binary heap priority queue and RB-tree