In the progress of testing the FG live cd (under qemu), I discovered
a rather interesting behavior of the UIUC FDM.
(My) qemu by default ram size to be 128mb. When I was trying to run
fgfs, it gave me an exception of std::bad_alloc and then terminated.
After having some hints from Melchior on what this could mean, followed
by a run under gdb, it pointed me to src/FDM/UIUCModel/uiuc_wrapper.cpp
line 120, which is simply a global:
AIRCRAFT *aircraft_ = new AIRCRAFT;
Then we check the size of the AIRCRAFT struct, and it turns out to
be about 117mb.
I probably don't know enough about UIUC's or in fact any FDMs'
internals and so I can't say whether this is a lot of memory for a FDM
or not. But having 117mb of memory allocated (or committed) at startup
(this is even before main(), btw), regardless of what aircraft/FDM is
being used, is probably not a good thing. Codewise, this struct is
rather big...
Anyway, I imagine someone who knows a bit more about UICI's code
could make it new-ing the struct only when it's actually used?
Pigeon.
---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel