Click here to Skip to main content
15,912,400 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: PostMessage Pin
mid=57419-Jul-07 5:30
mid=57419-Jul-07 5:30 
QuestionRe: PostMessage Pin
jbalaji849-Aug-07 21:18
jbalaji849-Aug-07 21:18 
AnswerRe: PostMessage Pin
Randor 8-Jul-07 6:57
professional Randor 8-Jul-07 6:57 
GeneralRe: PostMessage Pin
Bogdan Apostol8-Jul-07 8:59
Bogdan Apostol8-Jul-07 8:59 
GeneralRe: PostMessage Pin
Randor 8-Jul-07 9:06
professional Randor 8-Jul-07 9:06 
AnswerRe: PostMessage Pin
Bogdan Apostol8-Jul-07 10:43
Bogdan Apostol8-Jul-07 10:43 
QuestionGet exact memory usage of a process. Pin
zecodela7-Jul-07 23:03
zecodela7-Jul-07 23:03 
AnswerRe: Get exact memory usage of a process. Pin
Bogdan Apostol8-Jul-07 1:09
Bogdan Apostol8-Jul-07 1:09 
When you allocate 128 bytes through "new char[128]", you may not commit any new page of memory!!!
My point is that memory allocation is done by the heap manager used by your module. For example, if CRT is the heap manager (msvcrt.dll) you're linking with, all "malloc / new" kind of instructions will be handled by that library, which may reuse previously released memory, or return an address of already commited memory. The heap manager keeps track of your allocations, and commits pages of memory only when needed. For example, on first allocation, a number of pages are commited to support the request. On those pages there's still room for more allocations. Thus, next allocation, if small enough, will not commit more pages, but use the existing commited pages.
There're plenty of online resources explaining how a "heap manager" implementation works:
http://blogs.technet.com/askperf/archive/2007/06/26/what-a-heap-of-part-one.aspx[^]
http://en.wikipedia.org/wiki/Chunking_(computing)[^]
http://www.blackhat.com/presentations/bh-usa-06/BH-US-06-Marinescu.pdf[^]
http://www.freshpatents.com/Methods-systems-and-computer-program-products-for-managing-a-memory-by-storing-external-objects-in-a-dynamic-heap-dt20051215ptan20050278496.php[^]
Best regards,

Bornish
ESRI Developer Network

Compilers demystified - Function pointers in Visual Basic 6.0
Enables the use of function pointers in VB6 and shows how to embed native code in a VB application.

QuestionWM_COPYDATA message Pin
tom groezer7-Jul-07 22:35
tom groezer7-Jul-07 22:35 
AnswerRe: WM_COPYDATA message Pin
Bogdan Apostol8-Jul-07 1:20
Bogdan Apostol8-Jul-07 1:20 
GeneralRe: WM_COPYDATA message Pin
tom groezer8-Jul-07 5:08
tom groezer8-Jul-07 5:08 
GeneralRe: WM_COPYDATA message Pin
Randor 8-Jul-07 5:50
professional Randor 8-Jul-07 5:50 
GeneralRe: WM_COPYDATA message Pin
Bogdan Apostol8-Jul-07 8:35
Bogdan Apostol8-Jul-07 8:35 
Questionnew control icon into vc++ toobox Pin
eagle517-Jul-07 22:22
eagle517-Jul-07 22:22 
AnswerRe: new control icon into vc++ toobox Pin
David Crow9-Jul-07 3:44
David Crow9-Jul-07 3:44 
GeneralRe: new control icon into vc++ toobox Pin
eagle5110-Jul-07 23:06
eagle5110-Jul-07 23:06 
GeneralRe: new control icon into vc++ toobox Pin
David Crow11-Jul-07 2:29
David Crow11-Jul-07 2:29 
QuestionHyperTerminal script Pin
stevelizardi7-Jul-07 20:18
stevelizardi7-Jul-07 20:18 
QuestionInterprocess commmunication Pin
tom groezer7-Jul-07 11:41
tom groezer7-Jul-07 11:41 
AnswerRe: Interprocess commmunication Pin
Mark Salsbery7-Jul-07 12:10
Mark Salsbery7-Jul-07 12:10 
QuestionNotepad Pin
tom groezer7-Jul-07 11:37
tom groezer7-Jul-07 11:37 
AnswerRe: Notepad Pin
David Crow9-Jul-07 3:47
David Crow9-Jul-07 3:47 
QuestionMessage queue Pin
tom groezer7-Jul-07 11:35
tom groezer7-Jul-07 11:35 
AnswerRe: Message loop Pin
Mark Salsbery7-Jul-07 11:56
Mark Salsbery7-Jul-07 11:56 
AnswerRe: Message queue Pin
Blake Miller9-Jul-07 11:59
Blake Miller9-Jul-07 11:59 

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.