[fpc-devel] OO rewrite - technical questions

Jonas Maebe jonas.maebe at elis.ugent.be
Mon Jul 19 15:11:45 CEST 2010

On 19 Jul 2010, at 15:02, Mattias Gärtner wrote:

> After a quick glance on the rtl sources it seems ThreadVar works under some platforms internally pretty much the same as an object instance: it allocates some memory on the heap.

That's correct. FPC has largely platform-independent support for threadvars, which is much more heavy-weight than simply using a segment register (indirect procedure call depending on the thread manager, get thread local storage pointer, index local storage with offset specific to the threadvar).

There have been attempts to get the segment register approach to work on Windows, but afaik it always crashed on at least one Windows version.


More information about the fpc-devel mailing list