c++ - Reduce memory usage in boost build -
i'm trying build c++ library on linux system constrained memory resources, using g++ 4.6. library uses boost heavily.
i've seen various threads here , in other websites regarding compilation speed, i'm interested in tips , tricks make g++ less demanding on memory resources, though means loosing speed.
edit: i've tried using precompiled headers boost, improves build speed, still requires same amount of memory.
you have play garbage collector settings. parameters ggc-min-expand
, ggc-min-heapsize
. set ulimit ulimit 65536
(or whatever) reduce heap size (rlimit_as).
lots of information on in gcc manual here
a setting may set ggc-min-expand param 0 , ggc-min-heapsize param 8192 , try that...
cxxflags="$(cxxflags) --param ggc-min-expand=0 --param ggc-min-heapsize=8192" or such value.
Comments
Post a Comment