Click here to Skip to main content
14,034,925 members

C / C++ / MFC

 
AnswerRe: Conways Game of life game in C Pin
Richard MacCutchan3-Nov-18 3:57
protectorRichard MacCutchan3-Nov-18 3:57 
AnswerRe: Conways Game of life game in C Pin
元昊 潘3-Nov-18 4:04
member元昊 潘3-Nov-18 4:04 
GeneralRe: Conways Game of life game in C Pin
Victor Nijegorodov3-Nov-18 6:33
memberVictor Nijegorodov3-Nov-18 6:33 
GeneralHow to solve memory resource management problems in C++ Pin
元昊 潘2-Nov-18 22:55
member元昊 潘2-Nov-18 22:55 
GeneralRe: How to solve memory resource management problems in C++ Pin
Richard MacCutchan3-Nov-18 3:56
protectorRichard MacCutchan3-Nov-18 3:56 
AnswerRe: How to solve memory resource management problems in C++ Pin
元昊 潘3-Nov-18 4:39
member元昊 潘3-Nov-18 4:39 
GeneralRe: How to solve memory resource management problems in C++ Pin
Richard MacCutchan3-Nov-18 4:51
protectorRichard MacCutchan3-Nov-18 4:51 
AnswerRe: How to solve memory resource management problems in C++ Pin
元昊 潘3-Nov-18 5:04
member元昊 潘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
protectorRichard MacCutchan3-Nov-18 10:02 
AnswerRe: How to solve memory resource management problems in C++ Pin
元昊 潘3-Nov-18 16:26
member元昊 潘3-Nov-18 16:26 
GeneralRe: How to solve memory resource management problems in C++ Pin
Richard MacCutchan3-Nov-18 21:17
protectorRichard MacCutchan3-Nov-18 21:17 
AnswerRe: How to solve memory resource management problems in C++ Pin
元昊 潘3-Nov-18 22:00
member元昊 潘3-Nov-18 22:00 
GeneralRe: How to solve memory resource management problems in C++ Pin
Richard MacCutchan3-Nov-18 22:18
protectorRichard MacCutchan3-Nov-18 22:18 
GeneralRe: How to solve memory resource management problems in C++ Pin
元昊 潘3-Nov-18 22:30
member元昊 潘3-Nov-18 22:30 
GeneralRe: How to solve memory resource management problems in C++ Pin
Richard MacCutchan3-Nov-18 22:34
protectorRichard MacCutchan3-Nov-18 22:34 
PraiseRe: How to solve memory resource management problems in C++ Pin
元昊 潘3-Nov-18 23:44
member元昊 潘3-Nov-18 23:44 
GeneralRe: How to solve memory resource management problems in C++ Pin
Stefan_Lang13-Nov-18 22:52
memberStefan_Lang13-Nov-18 22:52 
GeneralRe: How to solve memory resource management problems in C++ Pin
meerokh7-Nov-18 0:39
membermeerokh7-Nov-18 0:39 
GeneralRe: How to solve memory resource management problems in C++ Pin
Stefan_Lang13-Nov-18 22:34
memberStefan_Lang13-Nov-18 22:34 
QuestionShared sections in a DLL Pin
Bram van Kampen2-Nov-18 13:39
memberBram van Kampen2-Nov-18 13:39 
AnswerRe: Shared sections in a DLL Pin
Afzaal Ahmad Zeeshan2-Nov-18 13:55
mveAfzaal Ahmad Zeeshan2-Nov-18 13:55 
AnswerRe: Shared sections in a DLL Pin
11917640 Member 5-Nov-18 4:34
member11917640 Member 5-Nov-18 4:34 
QuestionPrint Bitmap from Printing Class Library Pin
Member 1403961931-Oct-18 7:29
memberMember 1403961931-Oct-18 7:29 
AnswerRe: Print Bitmap from Printing Class Library Pin
Victor Nijegorodov31-Oct-18 8:15
memberVictor Nijegorodov31-Oct-18 8:15 
GeneralRe: Print Bitmap from Printing Class Library Pin
Member 1403961931-Oct-18 8:31
memberMember 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.


Advertise | Privacy | Cookies | Terms of Service
Web03 | 2.8.190424.1 | Last Updated 24 Apr 2019
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid