R
rzhu
Hi, there
I'm a beginer of STL and I have a question about the size of each map
entry. I'm using STL on Linux for string search and reverse search.
I'm using a multi_map for regular search (to handle the case of
multiple values per key) and a map for reverse search. For both maps,
the key and value types are 'string'. What I found out was that for
something as simple as a 2 character key and value size, my memory
usage is increasing at the rate of about 40 bytes per entry in the
multi_map and about 1000 bytes per entry in the map. I'm sure
something's not right but don't know where to start looking. Can
anyone point me to the right direction?
BTW, I'm using gcc 3.3.1 on linux for this program. Any suggestion is
greatly appreciated.
R. Zhu
I'm a beginer of STL and I have a question about the size of each map
entry. I'm using STL on Linux for string search and reverse search.
I'm using a multi_map for regular search (to handle the case of
multiple values per key) and a map for reverse search. For both maps,
the key and value types are 'string'. What I found out was that for
something as simple as a 2 character key and value size, my memory
usage is increasing at the rate of about 40 bytes per entry in the
multi_map and about 1000 bytes per entry in the map. I'm sure
something's not right but don't know where to start looking. Can
anyone point me to the right direction?
BTW, I'm using gcc 3.3.1 on linux for this program. Any suggestion is
greatly appreciated.
R. Zhu