Click here to Skip to main content
15,914,109 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: std::string in unicode builds Pin
George L. Jackson22-Sep-06 11:09
George L. Jackson22-Sep-06 11:09 
GeneralRe: std::string in unicode builds Pin
Steve S24-Sep-06 23:03
Steve S24-Sep-06 23:03 
GeneralRe: std::string in unicode builds Pin
George L. Jackson26-Sep-06 15:02
George L. Jackson26-Sep-06 15:02 
QuestionVS2005 versions of the following classes for WTL app ? Pin
Defenestration19-Sep-06 5:40
Defenestration19-Sep-06 5:40 
GeneralATL 8 registration troubles Pin
Wes Aday19-Sep-06 4:49
professionalWes Aday19-Sep-06 4:49 
AnswerRe: ATL 8 registration troubles Pin
Wes Aday28-Sep-06 5:21
professionalWes Aday28-Sep-06 5:21 
QuestionHow memory efficient is std::set? Pin
Dave Cross18-Sep-06 5:43
professionalDave Cross18-Sep-06 5:43 
AnswerRe: How memory efficient is std::set? Pin
Zac Howland18-Sep-06 6:17
Zac Howland18-Sep-06 6:17 
AnswerRe: How memory efficient is std::set? Pin
Jörgen Sigvardsson18-Sep-06 8:11
Jörgen Sigvardsson18-Sep-06 8:11 
GeneralRe: How memory efficient is std::set? Pin
Dave Cross18-Sep-06 23:15
professionalDave Cross18-Sep-06 23:15 
GeneralRe: How memory efficient is std::set? Pin
Jörgen Sigvardsson18-Sep-06 23:27
Jörgen Sigvardsson18-Sep-06 23:27 
AnswerRe: How memory efficient is std::set? Pin
Jörgen Sigvardsson18-Sep-06 8:12
Jörgen Sigvardsson18-Sep-06 8:12 
AnswerRe: How memory efficient is std::set? Pin
Stuart Dootson18-Sep-06 21:16
professionalStuart Dootson18-Sep-06 21:16 
GeneralRe: How memory efficient is std::set? Pin
Jörgen Sigvardsson18-Sep-06 21:30
Jörgen Sigvardsson18-Sep-06 21:30 
GeneralRe: How memory efficient is std::set? Pin
Dave Cross18-Sep-06 22:20
professionalDave Cross18-Sep-06 22:20 
GeneralRe: How memory efficient is std::set? [modified] Pin
Stuart Dootson19-Sep-06 0:32
professionalStuart Dootson19-Sep-06 0:32 
No, I don't think you have forgotten anything simple. It's difficult to say what memory usage is going to be without looking at the implementation Frown | :( However, if it's VC 7.1 you're using, then it looks like you have the following memory usage (this is from a running program built for Win32 Release):

The std::set object is 12 bytes. The VC7.1 std::set implementation is a red-black tree. Each node of the tree is 16 bytes plus the size of the object you've stored. In my case, I've stored pointers, so each node is 20 bytes. Ouch!

So total usage of a VC7.1 std::Set is 12 + n(16 + s), where n is the number of items stored and s is the size of each stored item.

Now, I'd guess most std::set implementations will have a similar level of overhead. So....I'm guessing you don't want to use std::set if you're tight on memory....

Last modified: 4mins after originally posted --



GeneralRe: How memory efficient is std::set? Pin
Zac Howland19-Sep-06 3:33
Zac Howland19-Sep-06 3:33 
Questionvariant and BSTR interactions Pin
Samy_Ibraheem_Mo17-Sep-06 10:18
Samy_Ibraheem_Mo17-Sep-06 10:18 
AnswerRe: variant and BSTR interactions Pin
Samy_Ibraheem_Mo17-Sep-06 11:43
Samy_Ibraheem_Mo17-Sep-06 11:43 
GeneralRe: variant and BSTR interactions Pin
Jörgen Sigvardsson17-Sep-06 12:12
Jörgen Sigvardsson17-Sep-06 12:12 
QuestionATL Control Pin
Demian Panello15-Sep-06 2:36
Demian Panello15-Sep-06 2:36 
Questionevent_source(com), event_receiver(com, true) __hooking problem Pin
sman_nz14-Sep-06 7:17
sman_nz14-Sep-06 7:17 
AnswerRe: event_source(com), event_receiver(com, true) __hooking problem Pin
Alex Boyce15-Sep-06 10:41
Alex Boyce15-Sep-06 10:41 
Questionshould we prefer deque over vector Pin
yccheok14-Sep-06 0:28
yccheok14-Sep-06 0:28 
AnswerRe: should we prefer deque over vector Pin
Zac Howland14-Sep-06 3:21
Zac Howland14-Sep-06 3:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.