[fpc-devel] ReallocMem with CMem

2006-03-08 Thread Micha Nelissen
Hi, Shouldn't ReallocMem in CMem zero the newly allocated bytes ? Micha ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Re: [fpc-devel] ReallocMem with CMem

2006-03-08 Thread Daniël Mantione
Op Wed, 8 Mar 2006, schreef Micha Nelissen: Hi, Shouldn't ReallocMem in CMem zero the newly allocated bytes ? No, it is the responsibility of the programmer. Daniël___ fpc-devel maillist - fpc-devel@lists.freepascal.org

Re: [fpc-devel] ReallocMem with CMem

2006-03-08 Thread Micha Nelissen
On Wed, 8 Mar 2006 18:10:38 +0100 (CET) Daniël Mantione [EMAIL PROTECTED] wrote: Op Wed, 8 Mar 2006, schreef Micha Nelissen: Shouldn't ReallocMem in CMem zero the newly allocated bytes ? No, it is the responsibility of the programmer. Nope. At least the compiler depends on it being

Re: [fpc-devel] ReallocMem with CMem

2006-03-08 Thread Jonas Maebe
On 8 mrt 2006, at 18:19, Micha Nelissen wrote: Shouldn't ReallocMem in CMem zero the newly allocated bytes ? No, it is the responsibility of the programmer. Nope. At least the compiler depends on it being zeroed. Where? It's a bug if it does. The FPC heap manager zeroes it, as well.

Re: [fpc-devel] ReallocMem with CMem

2006-03-08 Thread Mattias Gaertner
On Wed, 8 Mar 2006 18:19:40 +0100 Micha Nelissen [EMAIL PROTECTED] wrote: On Wed, 8 Mar 2006 18:10:38 +0100 (CET) Daniël Mantione [EMAIL PROTECTED] wrote: Op Wed, 8 Mar 2006, schreef Micha Nelissen: Shouldn't ReallocMem in CMem zero the newly allocated bytes ? No, it is the

Re: [fpc-devel] ReallocMem with CMem

2006-03-08 Thread Daniël Mantione
Op Wed, 8 Mar 2006, schreef Micha Nelissen: On Wed, 8 Mar 2006 18:10:38 +0100 (CET) Daniël Mantione [EMAIL PROTECTED] wrote: Op Wed, 8 Mar 2006, schreef Micha Nelissen: Shouldn't ReallocMem in CMem zero the newly allocated bytes ? No, it is the responsibility of the

Re: [fpc-devel] ReallocMem with CMem

2006-03-08 Thread Micha Nelissen
On Wed, 8 Mar 2006 18:33:53 +0100 Mattias Gaertner [EMAIL PROTECTED] wrote: Nope. At least the compiler depends on it being zeroed. The FPC heap manager zeroes it, as well. Not under linux. Are you sure? Hmm, that was changed then and the compiler was fixed; probably due to me mentioning

Re: [fpc-devel] ReallocMem with CMem

2006-03-08 Thread Micha Nelissen
On Wed, 8 Mar 2006 19:10:55 +0100 Mattias Gaertner [EMAIL PROTECTED] wrote: On Wed, 8 Mar 2006 19:01:11 +0100 Micha Nelissen [EMAIL PROTECTED] wrote: Hmm, that was changed then and the compiler was fixed; probably due to me mentioning it on IRC sometime ago, also :-). The name has 'alloc'

Re: [fpc-devel] ReallocMem with CMem

2006-03-08 Thread Michael Van Canneyt
On Wed, 8 Mar 2006, Micha Nelissen wrote: On Wed, 8 Mar 2006 19:10:55 +0100 Mattias Gaertner [EMAIL PROTECTED] wrote: On Wed, 8 Mar 2006 19:01:11 +0100 Micha Nelissen [EMAIL PROTECTED] wrote: Hmm, that was changed then and the compiler was fixed; probably due to me mentioning

Re: [fpc-devel] ReallocMem with CMem

2006-03-08 Thread Jonas Maebe
On 8 mrt 2006, at 20:34, Michael Van Canneyt wrote: What has 'alloc' to do with cleaning/zeroing? It is *the* difference between GetMem and AllocMem. Not in FPC. Reallocmem just resizes. No zeroing is done, as already explained by Jonas and Daniel. Yes, but allocmem() does zero the

Re: [fpc-devel] ReallocMem with CMem

2006-03-08 Thread Michael Van Canneyt
On Wed, 8 Mar 2006, Jonas Maebe wrote: On 8 mrt 2006, at 20:34, Michael Van Canneyt wrote: What has 'alloc' to do with cleaning/zeroing? It is *the* difference between GetMem and AllocMem. Not in FPC. Reallocmem just resizes. No zeroing is done, as already explained by Jonas