skip to content
Memory management : algorithms and implementation in C/C++ Preview this item
ClosePreview this item
Checking...

Memory management : algorithms and implementation in C/C++

Author: Bill Blunden
Publisher: Plano, Tex. : Wordware Pub., ©2003.
Series: Windows programming/development.
Edition/Format:   Print book : EnglishView all editions and formats
Rating:

(not yet rated) 0 with reviews - Be the first.

Subjects
More like this

Find a copy in the library

&AllPage.SpinnerRetrieving; Finding libraries that hold this item...

Details

Document Type: Book
All Authors / Contributors: Bill Blunden
ISBN: 1556223471 9781556223471
OCLC Number: 50316326
Description: xxvii, 360 pages : illustrations ; 23 cm.
Series Title: Windows programming/development.
Responsibility: by Bill Blunden.

Table of Contents:

by drozdek (WorldCat user on 2008-04-29)

Acknowledgments ...................... xi Introduction......................... xiii Chapter 1 Memory Management Mechanisms. ........ 1 Mechanism Versus Policy .................. 1 Memory Hierarchy ...................... 3 Address Lines and Buses................... 9 Intel Pentium Architecture ................. 11 Real Mode Operation. .................. 14 Protected Mode Operation. ............... 18 Protected Mode Segmentation ............ 19 Protected Mode Paging ................ 26 Paging as Protection.................. 31 Addresses: Logical, Linear, and Physical....... 33 Page Frames and Pages ................ 34 Case Study: Switching to Protected Mode ....... 35 Closing Thoughts ...................... 42 References.......................... 43 Chapter 2 Memory Management Policies. .......... 45 Case Study: MS-DOS .................... 46 DOS Segmentation and Paging ............. 46 DOS Memory Map .................... 47 Memory Usage ...................... 49 Example: A Simple Video Driver ............ 50 Example: Usurping DOS................. 52 Jumping the 640KB Hurdle ............... 56 Case Study: MMURTL ................... 59 Background and Design Goals.............. 60 MMURTL and Segmentation .............. 61 Paging Variations ..................... 63 MMURTL and Paging .................. 64 Memory Allocation.............. 66 Case Study: Linux................ 67 History and MINIX. ............. 67 Design Goals and Features. ......... 68 Linux and Segmentation ........... 69 Linux and Paging ................ 72 Three-Level Paging ............. 72 Page Fault Handling............. 76 Memory Allocation............... 76 Memory Usage ................. 81 Example: Siege Warfare ............ 82 Example: Siege Warfare, More Treachery . . 87 Case Study: Windows ............... 92 Historical Forces ................ 92 Memory Map Overview ............ 96 Windows and Segmentation .......... 99 Special Weapons and Tactics ........ 99 Crashing Windows with a Keystroke . . . . 102 Reverse Engineering the GDT ....... 102 Windows and Paging .............. 105 Linear Address Space Taxonomy ...... 105 Musical Chairs for Pages. .......... 106 Memory Protection ............. 108 Demand Paging................ 109 Memory Allocation ............... 110 Memory Usage ................. 114 Turning Off Paging ............... 117 Example: Things That Go Thunk in the Night 118 Closing Thoughts ................. 122 References ..................... 123 Books and Articles ............... 123 Web Sites ............... 125 Chapter 3 High-level Services. . . 127 View from 10,000 Feet. . . 127 Compiler-Based Allocation 129 Data Section....... 132 Code Section ...... 134 Stack. .......... 136 Activation Records . . 138 Scope ......... 144 Static or Dynamic? ......... ........ 150 Heap Allocation ............. ........ 151 System Call Interface......... ........ 151 The Heap ............... ........ 156 Manual Memory Management. . . ........ 157 Example: C Standard Library Calls ........ 158 Automatic Memory Management ......... 160 Example: The BDW Conservative Garbage Collector 161 Manual Versus Automatic?. ........ 164 The Evolution of Languages. .......... 168 Case Study: COBOL ............. 171 Case Study: FORTRAN. ........... 177 Case Study: Pascal .............. 181 Case Study: C ................. 184 Case Study: Java. ............... 192 Language Features............. 192 Virtual Machine Architecture ....... 194 Java Memory Management ........ 196 Memory Management: The Three-layer Cake. 202 References .................... 204 Chapter 4 Manual Memory Management. . . . 207 Replacements for malloc() and free() 207 System Call Interface and Porting Issues 208 Keep It Simple... Stupid! ......... 211 Measuring Performance .......... 212 The Ultimate Measure: Time ..... 212 ANSI and Native Time Routines . . 213 The Data Distribution: Creating Random Variates . 215 Testing Methodology ............ 219 Indexing: The General Approach ....... 224 malloc() Version 1: Bitmapped Allocation. 224 Theory.................... 224 Implementation ............... 226 tree.cpp .................. 227 bitmap.cpp ................ 232 memmgr.cpp ............... 236 mallocV1.cpp ............... 239 perform.cpp. ............... 241 driver-cpp ................. 241 Tests ........................... 242 Trade-Offs ........................ 247 malloc() Version 2: Sequential Fit. .......... 248 Theory. ......................... 249 Implementation ..................... 251 memmgr.cpp ..................... 251 mallocV2.cpp ..................... 260 driver.cpp ....................... 261 Tests ........................... 262 Trade-Offs ........................ 264 malloc() Version 3: Segregated Lists ......... 265 Theory. ......................... 265 Implementation ..................... 266 memmgr.cpp ..................... 267 mallocV3.cpp ..................... 274 Tests ........................... 275 Trade-Offs ........................ 279 Performance Comparison ................. 279 Chapter 5 Automatic Memory Management ........ 281 Garbage Collection Taxonomy .............. 281 malloc() Version 4: Reference Counting ....... 283 Theory. ......................... 283 Implementation ..................... 284 driver.cpp ....................... 285 mallocV4.cpp ..................... 287 perform.cpp. ..................... 288 memmgr.cpp ..................... 289 Tests ........................... 299 Trade-Offs ........................ 302 malloc() Version 5: Mark-Sweep ........... 304 Theory. ......................... 304 Implementation ..................... 307 driver.cpp ....................... 307 mallocV5.cpp ..................... 309 perform.cpp. ..................... 311 memmgr.cpp ..................... 312 Tests ........................... 325 Trade-Offs ........................ 330 Performance Comparison ................. 332 Potential Additions. .................... 332 Object Format Assumptions 333 Variable Heap Size ..... 335 Indirect Addressing..... 335 Real-Time Behavior..... 337 Life Span Characteristics. . 338 Multithreaded Support . . . 339 Chapter 6 Miscellaneous Topics ........... 343 Suballocators ................... 343 Monolithic Versus Microkernel Architectures . 348 Closing Thoughts ............... 351 Index 355

Reviews

User-contributed reviews
Retrieving GoodReads reviews...
Retrieving DOGObooks reviews...

Tags

Be the first.
Confirm this request

You may have already requested this item. Please select Ok if you would like to proceed with this request anyway.

Linked Data


Primary Entity

<http://www.worldcat.org/oclc/50316326> # Memory management : algorithms and implementation in C/C++
    a schema:Book, schema:CreativeWork ;
   library:oclcnum "50316326" ;
   library:placeOfPublication <http://id.loc.gov/vocabulary/countries/txu> ;
   library:placeOfPublication <http://experiment.worldcat.org/entity/work/data/8543441#Place/plano_tex> ; # Plano, Tex.
   schema:about <http://id.worldcat.org/fast/872010> ; # Computer algorithms
   schema:about <http://dewey.info/class/005.435/e21/> ;
   schema:about <http://id.worldcat.org/fast/843286> ; # C++ (Computer program language)
   schema:about <http://id.worldcat.org/fast/843279> ; # C (Computer program language)
   schema:about <http://id.worldcat.org/fast/1015971> ; # Memory management (Computer science)
   schema:bookFormat bgn:PrintBook ;
   schema:copyrightYear "2003" ;
   schema:creator <http://viaf.org/viaf/21510247> ; # Bill Blunden
   schema:datePublished "2003" ;
   schema:exampleOfWork <http://worldcat.org/entity/work/id/8543441> ;
   schema:inLanguage "en" ;
   schema:isPartOf <http://experiment.worldcat.org/entity/work/data/8543441#Series/windows_programming_development> ; # Windows programming/development.
   schema:name "Memory management : algorithms and implementation in C/C++"@en ;
   schema:productID "50316326" ;
   schema:publication <http://www.worldcat.org/title/-/oclc/50316326#PublicationEvent/plano_tex_wordware_pub_2003> ;
   schema:publisher <http://experiment.worldcat.org/entity/work/data/8543441#Agent/wordware_pub> ; # Wordware Pub.
   schema:workExample <http://worldcat.org/isbn/9781556223471> ;
   wdrs:describedby <http://www.worldcat.org/title/-/oclc/50316326> ;
    .


Related Entities

<http://experiment.worldcat.org/entity/work/data/8543441#Agent/wordware_pub> # Wordware Pub.
    a bgn:Agent ;
   schema:name "Wordware Pub." ;
    .

<http://experiment.worldcat.org/entity/work/data/8543441#Series/windows_programming_development> # Windows programming/development.
    a bgn:PublicationSeries ;
   schema:hasPart <http://www.worldcat.org/oclc/50316326> ; # Memory management : algorithms and implementation in C/C++
   schema:name "Windows programming/development." ;
   schema:name "Windows programming/development" ;
    .

<http://id.worldcat.org/fast/1015971> # Memory management (Computer science)
    a schema:Intangible ;
   schema:name "Memory management (Computer science)"@en ;
    .

<http://id.worldcat.org/fast/843279> # C (Computer program language)
    a schema:Intangible ;
   schema:name "C (Computer program language)"@en ;
    .

<http://id.worldcat.org/fast/843286> # C++ (Computer program language)
    a schema:Intangible ;
   schema:name "C++ (Computer program language)"@en ;
    .

<http://id.worldcat.org/fast/872010> # Computer algorithms
    a schema:Intangible ;
   schema:name "Computer algorithms"@en ;
    .

<http://viaf.org/viaf/21510247> # Bill Blunden
    a schema:Person ;
   schema:birthDate "1969" ;
   schema:familyName "Blunden" ;
   schema:givenName "Bill" ;
   schema:name "Bill Blunden" ;
    .

<http://worldcat.org/isbn/9781556223471>
    a schema:ProductModel ;
   schema:isbn "1556223471" ;
   schema:isbn "9781556223471" ;
    .


Content-negotiable representations

Close Window

Please sign in to WorldCat 

Don't have an account? You can easily create a free account.