Click here to Skip to main content
15,918,617 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: SysInternals FileMon - how? Pin
David Crow29-Oct-03 2:55
David Crow29-Oct-03 2:55 
GeneralRe: SysInternals FileMon - how? Pin
Alexander M.,29-Oct-03 3:28
Alexander M.,29-Oct-03 3:28 
GeneralRe: SysInternals FileMon - how? Pin
David Crow29-Oct-03 3:37
David Crow29-Oct-03 3:37 
GeneralOT Pin
peterchen29-Oct-03 3:39
peterchen29-Oct-03 3:39 
GeneralRe: OT Pin
Atlantys29-Oct-03 7:55
Atlantys29-Oct-03 7:55 
QuestionInternal memory management when using 'new'? Pin
Dominik Reichl28-Oct-03 22:38
Dominik Reichl28-Oct-03 22:38 
AnswerRe: Internal memory management when using 'new'? Pin
Alexander M.,28-Oct-03 23:38
Alexander M.,28-Oct-03 23:38 
AnswerRe: Internal memory management when using 'new'? Pin
peterchen29-Oct-03 0:20
peterchen29-Oct-03 0:20 
The first example will eat *much* more memory than the second.

Heaps are typically organized as a list of memory blocks that are either used or available. Since you might want to free the allocations in the first example individually, it needs to keep some extra information for each allocation.

The first one can slow down a program considerably, first because of memory footprint, second because searching for a matching free block takes longer (because there are much more blocks to look at). Many allocations of that small size are not recommended from the normal heap.

However, you can use a custom allocator that better fits your needs.






"Vierteile den, der sie Hure schimpft mit einem türkischen Säbel."

mlog || Agile Programming | doxygen

GeneralRe: Internal memory management when using 'new'? Pin
Dominik Reichl29-Oct-03 0:45
Dominik Reichl29-Oct-03 0:45 
AnswerRe: Internal memory management when using 'new'? Pin
David Crow29-Oct-03 3:19
David Crow29-Oct-03 3:19 
GeneralCEdit - how to get user confirmation via ENTER key Pin
srev28-Oct-03 22:27
srev28-Oct-03 22:27 
GeneralRe: CEdit - how to get user confirmation via ENTER key Pin
Roger Allen29-Oct-03 1:09
Roger Allen29-Oct-03 1:09 
GeneralRe: CEdit - how to get user confirmation via ENTER key Pin
srev29-Oct-03 2:16
srev29-Oct-03 2:16 
GeneralModeless Dialogues Pin
Alton Williams28-Oct-03 21:08
Alton Williams28-Oct-03 21:08 
GeneralRe: Modeless Dialogues Pin
KaЯl29-Oct-03 3:28
KaЯl29-Oct-03 3:28 
GeneralRe: Modeless Dialogues (box is not showing) Pin
Alton Williams29-Oct-03 21:06
Alton Williams29-Oct-03 21:06 
GeneralRe: Modeless Dialogues (box is not showing) Pin
KaЯl29-Oct-03 21:32
KaЯl29-Oct-03 21:32 
GeneralCMDIChildWnd Scrollbars Pin
alex.barylski28-Oct-03 21:06
alex.barylski28-Oct-03 21:06 
GeneralRe: CMDIChildWnd Scrollbars Pin
KaЯl29-Oct-03 3:17
KaЯl29-Oct-03 3:17 
GeneralPreventing a window from becoming maximized Pin
Vancouver28-Oct-03 19:16
Vancouver28-Oct-03 19:16 
GeneralRe: Preventing a window from becoming maximized Pin
Mumiozol28-Oct-03 22:30
Mumiozol28-Oct-03 22:30 
GeneralUnfortunately this does not work Pin
Vancouver29-Oct-03 13:41
Vancouver29-Oct-03 13:41 
GeneralRe: Unfortunately this does not work Pin
KaЯl29-Oct-03 21:38
KaЯl29-Oct-03 21:38 
GeneralRe: Preventing a window from becoming maximized Pin
Blake Miller30-Oct-03 9:12
Blake Miller30-Oct-03 9:12 
GeneralKaЯl and Blake Pin
Vancouver30-Oct-03 14:41
Vancouver30-Oct-03 14:41 

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.