Geeks Talk

Prepare for your Next Interview




Memory Leakage

This is a discussion on Memory Leakage within the Testing Issues forums, part of the Software Testing category; hi guys, What is the Memory Leakage? any one can explain me with details..................... i am waiting for you................ thanks, suresh....


Go Back   Geeks Talk > Software Testing > Testing Issues

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 03-27-2007
Junior Member
 
Join Date: Jan 2007
Location: chennai
Posts: 26
Thanks: 4
Thanked 2 Times in 2 Posts
aarusa is on a distinguished road
Memory Leakage

hi guys,

What is the Memory Leakage?

any one can explain me with details.....................

i am waiting for you................

thanks,

suresh.
Reply With Quote
The Following User Says Thank You to aarusa For This Useful Post:
Sponsored Links
  #2 (permalink)  
Old 04-05-2007
Expert Member
 
Join Date: Nov 2006
Location: Hyd-IND
Posts: 523
Thanks: 1
Thanked 55 Times in 46 Posts
sutnarcha is on a distinguished road
Re: Memory Leakage

This is something NEW. Can you please elaborate this question? The phrase Memory Leakage is used in which stage of s/w engineering process?
__________________
Lack of WILL POWER has caused more failure than
lack of INTELLIGENCE or ABILITY.

-sutnarcha-
Reply With Quote
  #3 (permalink)  
Old 04-05-2007
Contributing Member
 
Join Date: Feb 2007
Location: bangalore
Posts: 52
Thanks: 1
Thanked 11 Times in 9 Posts
neelim is on a distinguished road
Re: Memory Leakage

I think this is somethng that comes up during Performance testing.

Detecting memory leaks

Memory leaks in the Java language are a dangerous contributor to garbage collection bottlenecks. Memory leaks are more damaging than memory overuse, because a memory leak ultimately leads to system instability. Over time, garbage collection occurs more frequently until the heap is exhausted and the Java code fails with a fatal Out of Memory exception. Memory leaks occur when an unused object has references that are never freed. Memory leaks most commonly occur in collection classes, such as Hashtable because the table always has a reference to the object, even after real references are deleted.

High workload often causes applications to crash immediately after deployment in the production environment. This is especially true for leaking applications where the high workload accelerates the magnification of the leakage and a memory allocation failure occurs.

The following list contains important conclusions about memory leaks...



Long-running test
Memory leak problems can manifest only after a period of time, therefore, memory leaks are found easily during long-running tests. Short running tests can lead to false alarms. It is sometimes difficult to know when a memory leak is occurring in the Java language, especially when memory usage has seemingly increased either abruptly or monotonically in a given period of time. The reason it is hard to detect a memory leak is that these kinds of increases can be valid or might be the intention of the developer. You can learn how to differentiate the delayed use of objects from completely unused objects by running applications for a longer period of time. Long-running application testing gives you higher confidence for whether the delayed use of objects is actually occurring.


Repetitive test
In many cases, memory leak problems occur by successive repetitions of the same test case. The goal of memory leak testing is to establish a big gap between unusable memory and used memory in terms of their relative sizes. By repeating the same scenario over and over again, the gap is multiplied in a very progressive way. This testing helps if the number of leaks caused by the execution of a test case is so minimal that it is hardly noticeable in one run.

Use repetitive tests at the system level or module level. The advantage with modular testing is better control. When a module is designed to keep the private module without creating external side effects such as memory usage, testing for memory leaks is easier. First, the memory usage before running the module is recorded. Then, a fixed set of test cases are run repeatedly. At the end of the test run, the current memory usage is recorded and checked for significant changes. Remember, garbage collection must be suggested when recording the actual memory usage by inserting System.gc() in the module where you want garbage collection to occur, or using a profiling tool, to force the event to occur.


Concurrency test
Some memory leak problems can occur only when there are several threads running in the application. Unfortunately, synchronization points are very susceptible to memory leaks because of the added complication in the program logic. Careless programming can lead to kept or unreleased references. The incident of memory leaks is often facilitated or accelerated by increased concurrency in the system. The most common way to increase concurrency is to increase the number of clients in the test driver.

Consider the following points when choosing which test cases to use for memory leak testing:



A good test case exercises areas of the application where objects are created. Most of the time, knowledge of the application is required. A description of the scenario can suggest creation of data spaces, such as adding a new record, creating an HTTP session, performing a transaction and searching a record.

Look at areas where collections of objects are used. Typically, memory leaks are composed of objects within the same class. Also, collection classes such as Vector and Hashtable are common places where references to objects are implicitly stored by calling corresponding insertion methods. For example, the get method of a Hashtable object does not remove its reference to the retrieved object.
Reply With Quote
  #4 (permalink)  
Old 04-07-2007
Moderator
 
Join Date: Sep 2006
Location: Delhi (India)
Posts: 866
Thanks: 12
Thanked 81 Times in 65 Posts
jainbrijesh is on a distinguished road
Re: Memory Leakage

Memory leakage is nothing but we test the application for stack overflow type errors.Now it depends on tester how tester will do it.
__________________
Brijesh Jain
brijesh.tester@yahoo.co.in
http://softwaretestingexpertise.blogspot.com
Reply With Quote
  #5 (permalink)  
Old 04-09-2007
Junior Member
 
Join Date: Apr 2007
Location: Bangalore
Posts: 23
Thanks: 0
Thanked 1 Time in 1 Post
vvijaysagar is on a distinguished road
Re: Memory Leakage

hi memory leakage in the sence if u defined one object and allocated some memory to that one and u again allocated some memory to the same object without freeing the previous one u wil get memory leakage
Reply With Quote
  #6 (permalink)  
Old 04-09-2007
Junior Member
 
Join Date: Sep 2005
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
suman is on a distinguished road
Re: Memory Leakage

Can anyone tell me how to post a new message? Thanks.
-Suman
Reply With Quote
  #7 (permalink)  
Old 04-10-2007
Expert Member
 
Join Date: Nov 2006
Location: Hyd-IND
Posts: 523
Thanks: 1
Thanked 55 Times in 46 Posts
sutnarcha is on a distinguished road
Re: Memory Leakage

Suman,

You have asked your question by posting a new message.

I think you wanted to ask how to ask a new question. In other words how to create a new thread?

For that you have to go to the respective forum and click on the button “Ask”. On the top of the page, click on the link “Geek Talk”. Then choose the appropriate forum that your question belongs to and then on the forum page you will see “Ask” button.
__________________
Lack of WILL POWER has caused more failure than
lack of INTELLIGENCE or ABILITY.

-sutnarcha-
Reply With Quote
The Following User Says Thank You to sutnarcha For This Useful Post:
  #8 (permalink)  
Old 04-10-2007
Junior Member
 
Join Date: Sep 2005
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
suman is on a distinguished road
Re: Memory Leakage

Thanks Sutnarcha for your quick and helpful response.
-Suman
Reply With Quote
Reply

  Geeks Talk > Software Testing > Testing Issues


Thread Tools
Display Modes


Similar Threads

Thread Thread Starter Forum Replies Last Post
memory allocation for object reess C and C++ 12 22 Hours Ago 08:22 AM
Physical Memory and Virtual Memory blenda Windows 4 10-27-2008 01:15 AM
Allocating Memory joel C and C++ 1 09-16-2006 04:29 PM
Memory Function in C scott C and C++ 1 07-16-2006 12:24 PM
C Programming - Dynamic Memory allocation Lokesh M C and C++ 0 05-29-2006 03:35 AM


All times are GMT -4. The time now is 06:47 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 GeekInterview.com. All Rights Reserved