+ Reply to Thread
Results 1 to 5 of 5

Thread: what is memory leak

  1. #1
    Junior Member
    Join Date
    May 2006
    Location
    Posts
    12
    Rep Power
    8

    Question what is memory leak

    hi,


    what is memory leak? n wht is the difference between a stack n a heap?

    ranjita

  2. #2
    Moderator
    Join Date
    Jan 2006
    Posts
    4,879
    Rep Power
    58

    Re: what is memory leak

    In computer science, a memory leak is a particular kind of unintentional memory consumption by a computer program where the program fails to release memory when no longer needed. The term is meant as a humorous misnomer, since memory is not physically lost from the computer, but rather becomes claimed but ignored due to program logic flaws.

  3. #3
    Moderator
    Join Date
    Jan 2006
    Posts
    4,879
    Rep Power
    58

    Re: what is memory leak

    Traditionally in a process address space you would see stack growing upside down and heap growing upwards. An application wise difference is all the memory allocated dynamically gets allocated on heap viz. malloc free, calloc etc. The stack of an process contains stack frames( containing the return address linkage for a function and the data required in a stack which has the qualifier 'auto').

    Efficiency-wise, one thing I can think of is memory on stack should be a bit faster to access as the hit-ratio for the pages having stack memory should have a better chances in terms of cache and also virtual memory. There should be a few more here, which can be same as choice of using array vs new().

  4. #4
    Moderator
    Join Date
    Apr 2006
    Location
    India
    Posts
    1,731
    Rep Power
    43

    Re: what is memory leak

    program logic flaws - mostly while handling memory dynamically

    fastness - stack r heap depends on the appln ....

    vast research is going on 2 make the time complexity as o(1) ...

  5. #5
    Srinivas nemani
    Unregistered

    Post Re: what is memory leak

    C or C++ gives flexiblity to get memory dynamically from system stack,
    this dynamically taken memory will not be released it is by explictly...though it is no longer useful....in other terms this is wasting memory space without any use...
    if memory leaks grows there will be no space for normal program execution...
    this causes serious problems in complex applications...

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Memory Leak & Structure Padding
    By vijay in forum DATA STRUCTURES, C, C++, VC ++
    Replies: 4
    Last Post: 31-01-09, 11:51 PM
  2. freeing up memory
    By abeetha.m in forum OTHERS
    Replies: 3
    Last Post: 26-12-08, 04:52 PM
  3. OS performance
    By abeetha.m in forum OTHERS
    Replies: 3
    Last Post: 17-11-06, 12:43 AM
  4. how 2 test cookies & memory leakages
    By himas_81 in forum Testing Tools & QA
    Replies: 6
    Last Post: 27-10-06, 05:22 PM
  5. Parllel Processing And Primary memory Sha
    By sim124 in forum OTHERS
    Replies: 0
    Last Post: 02-03-06, 06:26 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Content Relevant URLs by vBSEO 3.5.1 PL1