[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Memory size and allocation
- To: linuxgames@sunsite.dk
- Subject: Re: Memory size and allocation
- From: Francesco Orsenigo <xarvh@lombardiacom.it>
- Date: Thu, 2 May 2002 17:11:21 +0200
- Delivered-To: archiver@seul.org
- Delivered-To: mailing list linuxgames@sunsite.dk
- Delivery-Date: Thu, 02 May 2002 11:12:05 -0400
- In-Reply-To: <7884.18452-32485-880727361-1020199003@seznam.cz>
- Mailing-List: contact linuxgames-help@sunsite.dk; run by ezmlm
- Organization: Xarvh Project
- References: <7884.18452-32485-880727361-1020199003@seznam.cz>
- Reply-To: linuxgames@sunsite.dk
Jiri Svoboda:
> When a program(process) terminates, the operating system
> automatically frees all memory that was allocated by the program. You
> don't have to care about anything.
This this interesting.
> You may still want to free any unused memory as soon as possible.
> Then you should free the blocks using the program's data structures.
I do that.
I free memory blocks as soon as the program recognizes they have not been
used in the last.. say 10 seconds, paying no attention to their sizes.
Mads Bondo Dydensborg:
>Actually it may have effects, from what kind of optimizations the compiler
>can make, to cache coherency effects. Doing what you sugggest will most
>likely improve the resulting binary AFAIK.
Hope so.
Thank you,
Francesco