[fpc-devel] cmem Size Field

Jonas Maebe jonas.maebe at elis.ugent.be
Fri Oct 19 16:11:27 CEST 2012

On 19 Oct 2012, at 14:44, Ewald wrote:

> On Fri, 19 Oct 2012 10:43:43 +0200, Jonas Maebe
> <jonas.maebe at elis.ugent.be>
> wrote:
>> As you explain, the FPC heap manager is what requires this  
>> information.
>> The MemSize function is standard functionality of the FPC heap  
>> managers,
>> and so is checking whether the correct size is specified when calling
>> freemem(p,size).
> I see... On the other hand, documentation
> (http://www.freepascal.org/docs-html/prog/progsu160.html) says that
> MemSize() should return the total amount of memory available for
> allocation; and can return 0 in case this functionality is not  
> supported.

It's probably a copy/paste error from the documentation for memavail,  
please file a bug report. Thanks.

> In contrast, the RTL docs postulate that MemSize() should return the  
> size
> of a previous allocated memory chunk. Which is what I always thought  
> that
> MemSize() did.



More information about the fpc-devel mailing list