[fpc-devel] cmem Size Field

Ewald bloody.middlefinger at yellowcouch.org
Fri Oct 19 14:44:27 CEST 2012


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.

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. This functionality is however not mentioned in the
documentation on the memory manager (see the above link)...

Am I missing something here?

Thanks in advance,
Ewald

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).




More information about the fpc-devel mailing list