Results 1 to 8 of 8

Thread: Memory Leakage

  1. #1
    Junior Member
    Join Date
    Jan 2007
    Answers
    23

    Memory Leakage

    hi guys,

    What is the Memory Leakage?

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

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

    thanks,

    suresh.


  2. #2
    Expert Member
    Join Date
    Nov 2006
    Answers
    518

    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-

  3. #3
    Contributing Member
    Join Date
    Feb 2007
    Answers
    47

    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.


  4. #4
    Moderator
    Join Date
    Sep 2006
    Answers
    920

    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.

    Regards,
    Brijesh Jain
    ---------------------------------------------------------
    Connect with me on Skype: jainbrijesh
    Google Plus : jainbrijeshji

  5. #5
    Junior Member
    Join Date
    Apr 2007
    Answers
    23

    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


  6. #6
    Junior Member
    Join Date
    Sep 2005
    Answers
    2

    Re: Memory Leakage

    Can anyone tell me how to post a new message? Thanks.
    -Suman


  7. #7
    Expert Member
    Join Date
    Nov 2006
    Answers
    518

    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-

  8. #8
    Junior Member
    Join Date
    Sep 2005
    Answers
    2

    Re: Memory Leakage

    Thanks Sutnarcha for your quick and helpful response.
    -Suman


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact