Hello Jonas, Tuesday, October 28, 2008, 4:58:04 PM, you wrote:
JM> 100 bytes and smaller are most certainly handled using pools by FC's JM> heap manager. This code is partially inherited from a Delphi one, so the test has been performed a few months ago using D7, maybe the fpc behavior is better. >> block some big objects are created and many times allocation pages >> seens to be only half filled using the calculator JM> The calculator and which base size? Did you call instancesize to see JM> how much space is required for each instance? The rough calculation has been performed (more or less, you know some months ago, but now I'm porting this piece of code) using the instancesize rounded to 8 bytes align and running a synthetic do/while that tries to simulate the creating/destroy after around 12 hours of heavy load. The final result taking the currently allocated memory (at the end) and adding 2 pointers for block index was that the used memory is around 80% more than the needed. Running the same do/while but without destroy any object and creating first the small objects and finally the large objects to end with the same amount of objects says that the memory occupation was only around 15% in excess. I'll search the hard disk for the test routine, maybe it is still somewhere in the HD. -- Best regards, JoshyFun _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal