From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1014db,cea30133e185dc3 X-Google-Attributes: gid1014db,public X-Google-Thread: fee84,cea30133e185dc3 X-Google-Attributes: gidfee84,public From: patchkov@acs1.acs.ucalgary.ca (Serguei Patchkovskii) Subject: Re: How do you release memory back to the kernel in C Date: 1998/05/20 Message-ID: <6jv9kk$uqc@ds2.acs.ucalgary.ca>#1/1 X-Deja-AN: 355045081 References: <35616C36.9167165F@citicorp.com> <35620a04.2342689789@207.126.101.81> Followup-To: comp.unix.osf.osf1,comp.lang.c Organization: The University of Calgary Newsgroups: comp.unix.osf.osf1,comp.lang.c Chris Engebretson (engebret@sg1.cr.usgs.gov) wrote: : What I generally recommend is freeing the block one byte at a time: Actually, real programmers never allocate memory from the kernel at all (in part because they do not like to share their hardware with somebody else's program, and kill the kernel as soon as they can lay their hands on the console switches). Real programmers use statically dimentioned arrays, and retype the object code with the new size by hand when the old limit is exceeded. In this way, that pesky problem with releasing memory is avoided altogether. Cheers, /Serge.P