TAILIEUCHUNG - Lecture Data structures and algorithms in Java (6th edition): Chapter 15.2 - Goodrich, Tamassia, Goldwasser

This chapter provides knowledge of memory management. Data structures and algorithms in java provides an introduction to data structures and algorithms, including their design, analysis, and implementation. | Memory Management 3/29/14 21:38 Presentation for use with the textbook Data Structures and Algorithms in Java, 6th edition, by M. T. Goodrich, R. Tamassia, and M. H. Goldwasser, Wiley, 2014 Memory Management Diagram of a 4×4 plane of magnetic core memory in an X/Y line coincident-current setup. By Tetromino. This file is licensed under the Creative Commons Attribution Unported license. © 2014 Goodrich, Tamassia, Goldwasser Memory Management 1 Computer Memory q   q   q   q   In order to implement any data structure on an actual computer, we need to use computer memory. Computer memory is organized into a sequence of words, each of which typically consists of 4, 8, or 16 bytes (depending on the computer). These memory words are numbered from 0 to N −1, where N is the number of memory words available to the computer. The number associated with each memory word is known as its memory address. © 2014 Goodrich, Tamassia, Goldwasser Memory Management 2 1 Memory Management 3/29/14 21:38 Object Creation q   q   q   With Python, all objects are stored in a pool of memory, known as the memory heap or Python heap (which should not be confused with the “heap” data structure). Consider what happens when we execute a command such as: w = Widget() A new instance of the class is created and stored somewhere within the memory heap. © 2014 Goodrich, Tamassia, Goldwasser Memory Management 3 Free List q   q   q   q   The storage available in the memory heap is divided into blocks, which are contiguous array-like “chunks” of memory that may be of variable or fixed sizes. The system must be implemented so that it can quickly allocate memory for new objects. One popular method is to keep contiguous “holes” of available free memory in a linked list, called the free list. Deciding how to allocate blocks of memory from the free list when a request is made is known as memory management. © 2014 Goodrich, Tamassia, Goldwasser Memory Management 4 2 Memory

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.