Re: memory allocation with malloc

2008-08-06 Thread Derek Ragona
At 01:16 AM 8/5/2008, Shyamal Shukla wrote: Hi All, I am trying to validate my understanding of how malloc works by means of the below C program which tries to corrupt essential information maintained by malloc for free() operation. The program allocates 4, 12 byte blocks (internally 16 by

Re: memory allocation with malloc

2008-08-05 Thread Giorgos Keramidas
On Tue, 05 Aug 2008 09:58:40 +0300, Giorgos Keramidas <[EMAIL PROTECTED]> wrote: > On Tue, 5 Aug 2008 11:46:06 +0530, "Shyamal Shukla" <[EMAIL PROTECTED]> wrote: >> However, this does not happen. Can someone please correct my >> understanding and provide me with a reference to the working of >> mal

Re: memory allocation with malloc

2008-08-04 Thread Giorgos Keramidas
On Tue, 5 Aug 2008 11:46:06 +0530, "Shyamal Shukla" <[EMAIL PROTECTED]> wrote: > Hi All, > > I am trying to validate my understanding of how malloc works by means > of the below C program which tries to corrupt essential information > maintained by malloc for free() operation. > > The program alloc

memory allocation with malloc

2008-08-04 Thread Shyamal Shukla
Hi All, I am trying to validate my understanding of how malloc works by means of the below C program which tries to corrupt essential information maintained by malloc for free() operation. The program allocates 4, 12 byte blocks (internally 16 bytes are allocated for each 12 byte block). Hen