|
Boost Users : |
From: Pratyush (pkprasoon_at_[hidden])
Date: 2006-04-13 05:42:24
Doug Gregor <dgregor <at> cs.indiana.edu> writes:
>
> 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<some_user_defined_class_type>) 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<vector<any_type> >. I will file a bug report with gcc.
> > > 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
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