Practical mod_perl / HTML Book /



previous page: 8.1.3. Good Memory Management
  
page up: HTML Version of the book
  
next page: 8.1.5. Memory-Sharing Capabilities

8.1.4. Avoiding Memory Leaks


Some OSes and/or their libraries (e.g., C runtime libraries) suffer from memory leaks. A leak is when some process requests a chunk of memory for temporary storage but then does not subsequently release it. The chunk of memory then won't be available for any purpose until the process that requested it dies. You cannot afford such leaks. A single mod_perl process sometimes serves thousands of requests before it terminates; if a leak occurs on every request, the memory demands could become huge. Of course, your code can be the cause of the memory leaks as well, but that's easy to detect and solve. Certainly, you can reduce the number of requests to be served over the process's life, but that can degrade performance. When you have so many performance concerns to think about, do you really want to be using faulty code that's not under your control?

 

Continue to:

  • prev: 8.1.3. Good Memory Management
  • Table of Contents
  • next: 8.1.5. Memory-Sharing Capabilities







TOP
previous page: 8.1.3. Good Memory Management
  
page up: HTML Version of the book
  
next page: 8.1.5. Memory-Sharing Capabilities


Menu

  • HTML Book
  • PDF Book
  • Download Code
  • Table of Contents
  • Errata
  • mod_perl2 User's Guide
  • Sitemap

Search


Add to Google




Creative Commons License


Written by
Eric Cholet (Logilune) and
Stas Bekman (StasoSphere & Free Books).


[ Privacy Policy | Terms of Use | About Us | Search ]

© 2007 StasoSphere.com