> It's possible to disable the UIUC and other esoteric FDMs entirely at
> the configure stage, IIRC.
I looked at FG's configure briefly and I do not see how.
Anyway, here's a patch attempting to "new" AIRCRAFT only when it's needed.
A brief test using the ornithopter versus the default c172p shows a
difference of about 109mb of memory use.
Pigeon.
Index: src/FDM/UIUCModel/uiuc_wrapper.cpp
===================================================================
RCS file: /var/cvs/FlightGear-0.9/source/src/FDM/UIUCModel/uiuc_wrapper.cpp,v
retrieving revision 1.15
diff -u -r1.15 uiuc_wrapper.cpp
--- src/FDM/UIUCModel/uiuc_wrapper.cpp 21 Feb 2006 17:37:32 -0000 1.15
+++ src/FDM/UIUCModel/uiuc_wrapper.cpp 8 Apr 2006 22:36:33 -0000
@@ -117,7 +117,7 @@
extern "C" void uiuc_network_recv_routine();
extern "C" void uiuc_network_send_routine();
-AIRCRAFT *aircraft_ = new AIRCRAFT;
+AIRCRAFT *aircraft_ = NULL;
// SendArray testarray(4950);
@@ -160,6 +160,11 @@
void uiuc_defaults_inits ()
{
+ if (aircraft_ == NULL)
+ {
+ aircraft_ = new AIRCRAFT;
+ }
+
// set defaults and initialize (called once from uiuc_init_2_wrapper)
//fog inits