Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 344
  • Last Modified:

Kernel/Memory Bleed

Can anyone explain to me what a Kernel/Memory bleed is and how to fix it?
0
Whittonian
Asked:
Whittonian
1 Solution
 
jhanceCommented:
If by "bleed" you mean what is more commonly called "leak" then the answer is the allocation of memory or other resources in a program without freeing them.

Example:

main()
{
  BYTE *p;

  while(1){
    Sleep(1000);
    p = new BYTE[1024];
  }
}

What does this program do?  It allocates 1024 BYTES of memory, and then does it again.  Over and over again.  Eventually all available resources for memory allocation will be consumed.

Of course, in practice things are not usually this obvious.  Usually you have objects or memory or handles or whatever that you forget to free under certain circumstances and the program "leaks".
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now