Click here to Skip to main content
16,004,806 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: PostMessage Pin
Jonathan Craig7-May-02 5:06
Jonathan Craig7-May-02 5:06 
QuestionCombine CListBox & CEdit? Pin
6-May-02 21:43
suss6-May-02 21:43 
AnswerRe: Combine CListBox & CEdit? Pin
PJ Arends6-May-02 21:54
professionalPJ Arends6-May-02 21:54 
AnswerRe: Combine CListBox & CEdit? Pin
Niklas L6-May-02 22:34
Niklas L6-May-02 22:34 
GeneralRe: Combine CListBox & CEdit? Pin
6-May-02 22:53
suss6-May-02 22:53 
GeneralRe: Combine CListBox & CEdit? Pin
Niklas L6-May-02 22:57
Niklas L6-May-02 22:57 
GeneralRe: Combine CListBox & CEdit? Pin
6-May-02 23:05
suss6-May-02 23:05 
Generalstd::map's cost Pin
dannywidjaya6-May-02 21:43
dannywidjaya6-May-02 21:43 
Does map reserve memory space like vector does? To check
the cost of having a map inside my class, I make a test
class like this:

struct object {
map<int, int=""> data;
};

the class size itself is 16 byte, obviously. But when I
make instances of that class, such as

int main() {
for(int i=0;i<10000;++i) object* ob = new object();
}

from the task manager I see that my process takes up about
1 MB for each additional 10000 objects, which means one
object cost about 100 bytes. Where did the extra 100-16 =
84 bytes come from? I haven't even added any entry to the maps. What can I do to reduce memory usage per object?

Thanks in advance,
Danny
.
GeneralRe: std::map's cost Pin
Paul M Watt6-May-02 21:49
mentorPaul M Watt6-May-02 21:49 
GeneralRe: std::map's cost Pin
Joaquín M López Muñoz6-May-02 22:18
Joaquín M López Muñoz6-May-02 22:18 
GeneralRe: std::map's cost Pin
dannywidjaya7-May-02 1:12
dannywidjaya7-May-02 1:12 
QuestionHow to create delay. Pin
Chanda.com6-May-02 21:32
Chanda.com6-May-02 21:32 
AnswerRe: How to create delay. Pin
Paul M Watt6-May-02 21:46
mentorPaul M Watt6-May-02 21:46 
GeneralRe: How to create delay. Pin
Chanda.com6-May-02 22:04
Chanda.com6-May-02 22:04 
GeneralRe: How to create delay. Pin
Sameer Maggon6-May-02 22:27
Sameer Maggon6-May-02 22:27 
GeneralTime Delay in rendering(DirectX) Pin
VCRamesh6-May-02 21:26
VCRamesh6-May-02 21:26 
GeneralRe: Time Delay in rendering(DirectX) Pin
Sameer Maggon7-May-02 0:06
Sameer Maggon7-May-02 0:06 
GeneralRe: Time Delay in rendering(DirectX) Pin
VCRamesh7-May-02 1:51
VCRamesh7-May-02 1:51 
Generalprinting bitmap problem Pin
BlackRider6-May-02 20:59
BlackRider6-May-02 20:59 
GeneralRe: printing bitmap problem Pin
Jonathan Craig7-May-02 5:33
Jonathan Craig7-May-02 5:33 
GeneralValidate a IP in CString Pin
Sameer Maggon6-May-02 20:08
Sameer Maggon6-May-02 20:08 
GeneralRe: Validate a IP in CString Pin
moliate7-May-02 7:50
moliate7-May-02 7:50 
GeneralCritical Sections (Semaphores etc..) Pin
Sameer Maggon6-May-02 20:04
Sameer Maggon6-May-02 20:04 
GeneralRe: Critical Sections (Semaphores etc..) Pin
Joaquín M López Muñoz6-May-02 21:03
Joaquín M López Muñoz6-May-02 21:03 
GeneralRe: Critical Sections (Semaphores etc..) Pin
Sameer Maggon6-May-02 21:12
Sameer Maggon6-May-02 21:12 

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.