Results 1 to 20 of 131

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Community Member Montrose's Avatar
    Join Date
    May 2006
    Posts
    156

    Default

    Quote Originally Posted by Junts View Post
    Thank you much.

    I want to edit/confirm a few things from the thread that are consistent with my experiences:

    2: Its not a memory leak but rather the persistent pagefile/memory growth, in that it doesn't require a reboot to correct.
    That is not a correct definition of memory leak as it is commonly used in the sfotware industry. Due to the way that the OS insulates itself, it is actually quite difficult to design a program that will retain memory once the process has been terminated (where "memory" above does not refer permanent or semi-permanent storage such as hard drives, CF cards, USB sticks, etc).

    A memory leak is simply an allocation of memory that you cannot (easily) get back.

    This, for example, is a (trivial and short-lived) memory leak (assuming no garbage collector):

    void LeakyLeak()
    {
    int *pnGoodByeCruelWorld = malloc(1);
    pnGoodByeCruelWorld = 5; // At this point you will have a hard time freeing the original memory since the address is lost
    }
    Last edited by Montrose; 10-08-2010 at 11:40 AM. Reason: Added comment for clarity
    You may know me as: Gannot, Gonnet, Gunnet, Ginnet, Gaxxat, Gennot, Gannut, Gxnnxt, Horseface, Izzayhay, Pailmaster, Artifactual, Gynnet and/or Barred. What? I like alts.

  2. #2
    Hatchery Founder
    2014 DDO Players Council
    Coldin's Avatar
    Join Date
    Jan 2006
    Posts
    0

    Default

    Quote Originally Posted by Montrose View Post
    That is not a correct definition of memory leak as it is commonly used in the sfotware industry. Due to the way that the OS insulates itself, it is actually quite difficult to design a program that will retain memory once the process has been terminated (where "memory" above does not refer permanent or semi-permanent storage such as hard drives, CF cards, USB sticks, etc).

    A memory leak is simply an allocation of memory that you cannot (easily) get back.

    This, for example, is a (trivial and short-lived) memory leak (assuming no garbage collector):

    void LeakyLeak()
    {
    int *pnGoodByeCruelWorld = malloc(1);
    pnGoodByeCruelWorld = 5; // At this point you will have a hard time freeing the original memory since the address is lost
    }
    And then even if you have a garbage collector, it could be poorly implemented to not free all assets.

    But yeah, once you close the client, all the memory it was using will be freed.
    RedShirt / Roleplayer of Giant Slayers, Inc. on Thelanis, formerly Tharashk.
    Member of the DDO Player Council

    Coldin-Artificer; Lynton-Bard; Alydyn-Swashbuckler;
    Takai-
    Monk; Rosein-Paladin; Ellyiana-Cleric; Aurixs-Sorcerer

Posting Permissions

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

This form's session has expired. You need to reload the page.

Reload