All,
We are getting the virtual memory exhausted error when compiling a Boost state machine file. If we cut back the number of state transitions in this state machine, we do not get the error, and the compile completes without errors. We are using Boost 1.49.
Here is what we have done:
1) Allocated 4GB of memory to our Virtual Machine(it runs Ubuntu), and created a 4.5GB swap file. When I compile I look at the System Monitor dialog, and can see that the RAM memory is not even used up when we get the compile error. The virtual memory is never used.
2) I saw online that the 3.80 version of make had a bug that would cause this type of error. I've confirmed that we are using 3.81. I also tried 3.82, but get the same error.
3) I've confirmed that "ulimit -v" returns "unlimited"
4) Looking online, I saw a recommendation to add the following two lines to /etc/security/limits.conf. I've tried this but I still get the error.
* hard rss unlimited
* hard cpu unlimited
1)
2)
3)
4)
5) We have set up precompiled headers, and I've added SystemHSM.hpp, and associated Boost include files to our list of precompiled headers. However, I still get the error.
6) FYI - In the past we ran up against Boost's limit of 20 state transitions per state machine. To get around that, I've added the following to SystemHSM.cpp:
#define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS // Discard the pre-generated headers and use preprocessor metaprogramming techniques to generate the necessary versions of the library components on the fly.
#define BOOST_MPL_LIMIT_VECTOR_SIZE 50 // Increase the default (transition table) vector size beyond the standard limit of 20.
#include