V
Varun Kacholia
Apologies if this has been answered somewhere, but Google did not
produce any concrete
results. I would like to find out the memory footprint of a vector<T>.
I tried to dig in the STL code and if I understand correctly, its 3 *
void(*) +
sizeof(T) * size_of_vector. (3 ptrs for __M_start, __M_finish and
__M_end_of_storage).
If any STL guru could confirm my findings, that would be much
appreciated.
Also, if someone could throw in the memory numbers for STL hashmap and
set,
that would be great!
Thanks.
produce any concrete
results. I would like to find out the memory footprint of a vector<T>.
I tried to dig in the STL code and if I understand correctly, its 3 *
void(*) +
sizeof(T) * size_of_vector. (3 ptrs for __M_start, __M_finish and
__M_end_of_storage).
If any STL guru could confirm my findings, that would be much
appreciated.
Also, if someone could throw in the memory numbers for STL hashmap and
set,
that would be great!
Thanks.