Am 06.01.2010 15:38, schrieb Jonas Maebe: > > On 06 Jan 2010, at 15:25, Stefan Kisdaroczi wrote: > >> AFAIK the RTL allocs the heap on app startup, or on thread-creation >> with 2.4.0. >> In my code im using getmem() to alloc mem from the heap, this will not >> generate >> syscalls because the heap is already allocated and the RTL has its own >> MemoryManager. > > This is not entirely correct: while the rtl does pre-allocate some > memory from the system on startup, it can still allocate more later if > necessary, and it can also free memory back to the system.
Thank you for that important hint. Are there any other options than a custom MemoryManager to disable that ? For the custom MemoryManager way I think I just copy the original one, try to disable the reallocating and freeing, and preallocate more on startup. On the other side I think its not really grave for my project, as I never allocate anything in the realtime loops. And there are no Objects/Classes, just plain pascal. The same code still needs to compile on a 16Bit Compiler from 1989 (DOS based realtime system)... Btw, about circular references : This old compiler uses C-like header files, no interface and implementation section. So you don't have any circular reference problems. To get the 15 apps with 500+ units compatible to fpc and to avoid circular references it was a lot of work, but its doable. kisda
signature.asc
Description: OpenPGP digital signature
_______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel