
Doug Gregor
On Apr 12, 2006, at 5:01 AM, Pratyush wrote:
The graph populated is taking about 190MB of memory, i.e., 32 bytes/ vertex approx. I was expecting it to take 4 bytes/vertex.
That does sound high... are you using a 32- or 64-bit platform?
I used 64-bit platform. That explains 24 bytes out of 32 bytes. I am not clear about the remaining 8 bytes.
Neither am I. <snip> What is sizeof(vector
) on your platform?
It seems that the problem is with the STL implementation that ships with gcc. I
am using 3.4.2 version. Even though sizeof operator gives the correct result,
valgrind (or memusage) shows that somewhere extra bytes are eaten up whenever I
use vector
The next release of the Graph library will have the compressed_sparse_row_graph graph type, which requires much less memory than adjacency_list.
That's good news! I am eagerly looking for the next release.
You can always grab the compressed_sparse_row.hpp header from Boost CVS. It isn't likely to change before the release, unless someone finds a problem with it.
I checked it out! I will have to write a routine to read the graph in sorted order from a file. Anyways, thanks a lot for your support. Regards, Pratyush