|
Boost Users : |
From: Olivier Delalleau (delallea_at_[hidden])
Date: 2006-03-15 21:25:50
I am constructing a graph exactly the same way as in the spanning tree
example here:
http://www.boost.org/libs/graph/example/prim-example.cpp
i.e. using a constructor of the kind
Graph g(edges, edges + sizeof(edges) / sizeof(E), weights, num_nodes);
where Graph is some kind of adjacency_list.
In my application, edges is rather big (on the order of 1e7 elements).
Problem: when this constructor is called, it allocates a huge amount of
memory (I see this when I do a 'top' to monitor the memory usage while
in gdb). And this memory is not freed when the graph is deleted (when it
gets out of the scope, or, if I use a pointer instead, when I delete it
explicitely).
Is there a way to recover this memory? Any hint on how to make it use
less memory?
Thank you,
Olivier
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net