Boost logo

Boost Users :

From: Pratyush (pkprasoon_at_[hidden])
Date: 2006-04-12 05:01:56


> > 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? Each
> vertex needs to store a vector, which is typically 3 pointers (12 or
> 24 bytes, depending on platform).

I should have been specific about the machine that I was using. I used 64-bit
platform. That explains 24 bytes out of 32 bytes. I am not clear about the
remaining 8 bytes. It could be seen from the code that I posted, there are no
edges in the graph at all - only vertices. The vectors used for storing the out
edges should be empty.

Maybe, instead of vecS as OutEdgeList, I should be using listS (or slistS) if
number of out edges per vertex is less, say, 2 or 3.

> The next release of the Graph library will have the
> compressed_sparse_row_graph graph type, which requires much less
> memory than adjacency_list. Naturally, it's also less flexible.

That's good news! I am eagerly looking for the next release.

Thanks for your reply Doug. My doubts have been clarified.

Regard,
Pratyush


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