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.


Jonas_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to