Click here to Skip to main content
15,895,011 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Caption of Dialog Pin
Hamid_RT24-Jul-06 19:53
Hamid_RT24-Jul-06 19:53 
GeneralRe: Caption of Dialog Pin
see me24-Jul-06 20:01
see me24-Jul-06 20:01 
GeneralRe: Caption of Dialog Pin
ThatsAlok25-Jul-06 0:30
ThatsAlok25-Jul-06 0:30 
GeneralRe: Caption of Dialog Pin
Hamid_RT24-Jul-06 20:04
Hamid_RT24-Jul-06 20:04 
Questionmemory free Pin
Try24-Jul-06 18:25
Try24-Jul-06 18:25 
AnswerRe: memory free Pin
Stephen Hewitt24-Jul-06 19:13
Stephen Hewitt24-Jul-06 19:13 
AnswerRe: memory free Pin
Divyang Mithaiwala24-Jul-06 19:14
Divyang Mithaiwala24-Jul-06 19:14 
GeneralRe: memory free Pin
Stephen Hewitt24-Jul-06 22:18
Stephen Hewitt24-Jul-06 22:18 
Divyang Mithaiwala wrote:
But if u want to write something that exception is generate.

 That's not necessarily true. For example, on x86 Windows the CPU, and therefore the OS, can only map memory around in 4K chunks. Another way of saying this is that on Windows (x86) the page size is 4K. This means that if you use a low level memory allocation function (like VirtualAlloc) the minimum allocation size is 4K. Getting around this limitation is one of the main functions of the heap (whether it's the Win32 heap accessed with functions like HeapAlloc or a custom heap layered over HeapAlloc or implemented in terms of VirualAlloc). When you attempt a small allocation from a heap (less then 4K on Windows) the heap gets a page of memory (if it hasn't already gone one handy) and hands you part of it. If another small allocation occurs it will hand out another piece of this same page (or some other partially used page) until the whole page is full and then it will get another page and start over. In short, just because you free some memory from a heap doesn’t mean the page that contains that address is freed as other allocations may reside in the same page: only when all allocations on a particular page are freed can the heap release the physical memory (and it may still not do so straight away). The OS can’t efficiently arrange for an exception to be generated when you access the unused part of a page as the underlying hardware only supports setting the memory protection attributes for a whole page. The real situation is even more complex than this brief description: for example the heap can recycle a heap block (and thus not free it) even when it contains no allocations as a form of caching and it need not change the protection on the page (so an exception is generated on access) as doing so means a context switch to Ring-0 and then another back to Ring-3.
QuestionAbout Static Control Pin
Thanhnamdo24-Jul-06 17:58
Thanhnamdo24-Jul-06 17:58 
AnswerRe: About Static Control Pin
Hamid_RT24-Jul-06 18:07
Hamid_RT24-Jul-06 18:07 
GeneralRe: About Static Control Pin
see me24-Jul-06 18:18
see me24-Jul-06 18:18 
GeneralRe: About Static Control Pin
Thanhnamdo24-Jul-06 18:22
Thanhnamdo24-Jul-06 18:22 
GeneralRe: About Static Control Pin
see me24-Jul-06 18:31
see me24-Jul-06 18:31 
GeneralRe: About Static Control Pin
Hamid_RT24-Jul-06 19:52
Hamid_RT24-Jul-06 19:52 
AnswerRe: About Static Control Pin
see me24-Jul-06 18:14
see me24-Jul-06 18:14 
QuestionAbout command line arguments... Pin
simonchen.net24-Jul-06 17:08
simonchen.net24-Jul-06 17:08 
AnswerRe: About command line arguments... Pin
Michael Dunn24-Jul-06 18:43
sitebuilderMichael Dunn24-Jul-06 18:43 
GeneralRe: About command line arguments... Pin
simonchen.net24-Jul-06 19:02
simonchen.net24-Jul-06 19:02 
GeneralRe: About command line arguments... Pin
Michael Dunn24-Jul-06 22:58
sitebuilderMichael Dunn24-Jul-06 22:58 
Question[Noob] Using class pointers [modified] Pin
Lord Kixdemp24-Jul-06 16:59
Lord Kixdemp24-Jul-06 16:59 
AnswerRe: [Noob] Using class pointers [modified] Pin
John M. Drescher24-Jul-06 17:08
John M. Drescher24-Jul-06 17:08 
AnswerRe: [Noob] Using class pointers Pin
bob1697224-Jul-06 17:12
bob1697224-Jul-06 17:12 
GeneralRe: [Noob] Using class pointers Pin
Lord Kixdemp24-Jul-06 17:16
Lord Kixdemp24-Jul-06 17:16 
GeneralRe: [Noob] Using class pointers Pin
bob1697224-Jul-06 17:25
bob1697224-Jul-06 17:25 
GeneralRe: [Noob] Using class pointers Pin
Lord Kixdemp24-Jul-06 17:31
Lord Kixdemp24-Jul-06 17:31 

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.