This has been the worst struggle I've ever had to do with getting MFC to do what I want.
I had to add Icons to a Context menu and so far I have done it successfully for Vista. For XP its another ball-game altogether.
This has been the worst struggle I've ever had to do with getting MFC to do what I want.
I had to add Icons to a Context menu and so far I have done it successfully for Vista. For XP its another ball-game altogether.
For years that i have been programming i have taken pride in the fact that I check for all the newly allocated pointer against NULL and don't use it otherwise.
No imagine the following scenario
Lets investigate as to what happened
The result
Your app just "crashed and burned". Why? because although you checked for a NULL return from the allocating routines but you didn't use it and check for a "segmentation fault" following the access to the memory. a BIG WTF.
One solution I can think of is to follow this procedure
Conclusion
My stand
I don't know who and why would think up this feature, let alone make it a system wide policy. if this would have been a process level settings wherein the developer would have to explicitly tell the compiler to enable "Over Commit" then i could have let that fancy dev do whatever he/she wanted, but making this default setting on every Linux box... WOW, no other words.
Yes i know there may be some advantages to this, but the risk far outweighs the advantages. Let the crazy ones make this choices of doing all the juggling for allocating valid memory, I just want the NULL back.
I found this on gnu.org
Memory overcommit is a Linux kernel feature that lets applications allocate more memory than is actually available. The idea behind this feature is that some applications allocate large amounts of memory "just in case", but never actually use it. Thus, memory overcommit allows you to run more applications than actually fit in your memory, provided the applications don't actually use the memory they've allocated. If they do, then the kernel terminates the application.
Wow, I got terminated because I asked for memory and then used the memory i got back. am I missing something here?