Sender: nate AT cartsys DOT com Message-ID: <377E4BED.3C8F1F12@cartsys.com> Date: Sat, 03 Jul 1999 10:44:13 -0700 From: Nate Eldredge X-Mailer: Mozilla 4.08 [en] (X11; I; Linux 2.2.10 i586) MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: Allocated memory blocks References: <7ljrk1$d4$1 AT newssrv DOT otenet DOT gr> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com Pavlos wrote: > > Let's say I allocate any size of memory using malloc(). Can I always assume > that this block of memory will not be fragmented? Even if it is huge? Define "fragmented". It will appear to your program as a contiguous block of memory-- no holes. But where, or even if, it exists in physical memory is not guaranteed. It may be physically scattered across RAM, but the virtual memory mechanisms make this invisible to you. So, for the purposes of C, it's not fragmented. For the purposes of DMA or other external hardware, it may well be. -- Nate Eldredge nate AT cartsys DOT com