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

C / C++ / MFC

 
AnswerRe: Conways Game of life game in C Pin
Richard MacCutchan3-Nov-18 3:57
mveRichard MacCutchan3-Nov-18 3:57 
AnswerRe: Conways Game of life game in C Pin
元昊 潘3-Nov-18 4:04
元昊 潘3-Nov-18 4:04 
GeneralRe: Conways Game of life game in C Pin
Victor Nijegorodov3-Nov-18 6:33
Victor Nijegorodov3-Nov-18 6:33 
GeneralHow to solve memory resource management problems in C++ Pin
元昊 潘2-Nov-18 22:55
元昊 潘2-Nov-18 22:55 
GeneralRe: How to solve memory resource management problems in C++ Pin
Richard MacCutchan3-Nov-18 3:56
mveRichard MacCutchan3-Nov-18 3:56 
AnswerRe: How to solve memory resource management problems in C++ Pin
元昊 潘3-Nov-18 4:39
元昊 潘3-Nov-18 4:39 
GeneralRe: How to solve memory resource management problems in C++ Pin
Richard MacCutchan3-Nov-18 4:51
mveRichard MacCutchan3-Nov-18 4:51 
AnswerRe: How to solve memory resource management problems in C++ Pin
元昊 潘3-Nov-18 5:04
元昊 潘3-Nov-18 5:04 
A common problem with using C++ in embedded systems is memory allocation, which is a loss of control over the new and delete operators.
Ironically, the root of the problem is that C++ 's memory management is very easy and secure.Specifically, when an object is eliminated, its destructor can safely free the allocated memory.
This is of course a good thing, but the simplicity of this use makes programmers overuse new and delete without paying attention to cause and effect in an embedded C++ environment.Furthermore, in embedded systems, frequent dynamic allocation of memory of variable size can cause significant problems and risk of heap fragmentation due to memory limitations.
As a warning, conservative use of memory allocation is the first principle in an embedded environment.
But when you have to use new and delete, you have to control memory allocation in C++.You need to replace the system's memory allocation with a global new and delete, and overloads new and delete from class to class.
It maybe also a good solution by operating new and delete,but I think that linking memory blocks with linked lists can be a relatively simple approach, as my teacher said.
GeneralRe: How to solve memory resource management problems in C++ Pin
Richard MacCutchan3-Nov-18 10:02
mveRichard MacCutchan3-Nov-18 10:02 
AnswerRe: How to solve memory resource management problems in C++ Pin
元昊 潘3-Nov-18 16:26
元昊 潘3-Nov-18 16:26 
GeneralRe: How to solve memory resource management problems in C++ Pin
Richard MacCutchan3-Nov-18 21:17
mveRichard MacCutchan3-Nov-18 21:17 
AnswerRe: How to solve memory resource management problems in C++ Pin
元昊 潘3-Nov-18 22:00
元昊 潘3-Nov-18 22:00 
GeneralRe: How to solve memory resource management problems in C++ Pin
Richard MacCutchan3-Nov-18 22:18
mveRichard MacCutchan3-Nov-18 22:18 
GeneralRe: How to solve memory resource management problems in C++ Pin
元昊 潘3-Nov-18 22:30
元昊 潘3-Nov-18 22:30 
GeneralRe: How to solve memory resource management problems in C++ Pin
Richard MacCutchan3-Nov-18 22:34
mveRichard MacCutchan3-Nov-18 22:34 
PraiseRe: How to solve memory resource management problems in C++ Pin
元昊 潘3-Nov-18 23:44
元昊 潘3-Nov-18 23:44 
GeneralRe: How to solve memory resource management problems in C++ Pin
Stefan_Lang13-Nov-18 22:52
Stefan_Lang13-Nov-18 22:52 
GeneralRe: How to solve memory resource management problems in C++ Pin
meerokh7-Nov-18 0:39
meerokh7-Nov-18 0:39 
GeneralRe: How to solve memory resource management problems in C++ Pin
Stefan_Lang13-Nov-18 22:34
Stefan_Lang13-Nov-18 22:34 
QuestionShared sections in a DLL Pin
Bram van Kampen2-Nov-18 13:39
Bram van Kampen2-Nov-18 13:39 
AnswerRe: Shared sections in a DLL Pin
Afzaal Ahmad Zeeshan2-Nov-18 13:55
professionalAfzaal Ahmad Zeeshan2-Nov-18 13:55 
AnswerRe: Shared sections in a DLL Pin
11917640 Member 5-Nov-18 4:34
11917640 Member 5-Nov-18 4:34 
QuestionPrint Bitmap from Printing Class Library Pin
Member 1403961931-Oct-18 7:29
Member 1403961931-Oct-18 7:29 
AnswerRe: Print Bitmap from Printing Class Library Pin
Victor Nijegorodov31-Oct-18 8:15
Victor Nijegorodov31-Oct-18 8:15 
GeneralRe: Print Bitmap from Printing Class Library Pin
Member 1403961931-Oct-18 8:31
Member 1403961931-Oct-18 8: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.