Click here to Skip to main content
15,888,286 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to increase memory to avoid exception std::bad_alloc? Pin
Javier Luis Lopez17-Dec-15 1:26
Javier Luis Lopez17-Dec-15 1:26 
GeneralRe: How to increase memory to avoid exception std::bad_alloc? Pin
Jochen Arndt17-Dec-15 1:30
professionalJochen Arndt17-Dec-15 1:30 
PraiseRe: How to increase memory to avoid exception std::bad_alloc? Pin
jeron117-Dec-15 4:04
jeron117-Dec-15 4:04 
GeneralRe: How to increase memory to avoid exception std::bad_alloc? Pin
Javier Luis Lopez17-Dec-15 22:03
Javier Luis Lopez17-Dec-15 22:03 
GeneralRe: How to increase memory to avoid exception std::bad_alloc? Pin
jeron118-Dec-15 3:57
jeron118-Dec-15 3:57 
GeneralRe: How to increase memory to avoid exception std::bad_alloc? Pin
CPallini17-Dec-15 21:46
mveCPallini17-Dec-15 21:46 
GeneralRe: How to increase memory to avoid exception std::bad_alloc? Pin
David Crow17-Dec-15 2:43
David Crow17-Dec-15 2:43 
GeneralRe: How to increase memory to avoid exception std::bad_alloc? Pin
Chris Losinger17-Dec-15 4:46
professionalChris Losinger17-Dec-15 4:46 
task manager isn't going to help you much.

at a high level, it works something like this:

when you allocate memory, it comes from your process's heap - if that heap is too small, it allocates more from the OS (up to the OS's per-process memory limit). when you free memory, it typically goes back to the process's heap, not back to the OS. this happens because it's common for a program to allocate/free the same amount of memory over and over, and it's quicker to just grab memory from the process's heap than to get the OS involved. so, under normal situations, your heap rarely shrinks. it typically grows and grows until it gets big enough to keep your program satisfied. it's only when your app shuts down that the heap memory is finally and completely released back to the OS.

if the OS itself is running low on memory, it will start grabbing unused heap memory from your process. so sometimes you'll see Task Manager show a drop after a large free - some other process needs a large contiguous block and the OS hands it over. but don't count on that.

AnswerRe: How to increase memory to avoid exception std::bad_alloc? Pin
Javier Luis Lopez17-Dec-15 1:23
Javier Luis Lopez17-Dec-15 1:23 
QuestionSFTP in VS6 Pin
Schehaider_Aymen16-Dec-15 21:39
Schehaider_Aymen16-Dec-15 21:39 
QuestionHiding Registry Information From Readability in Assembler Pin
Lakshmi Dhivya15-Dec-15 20:24
Lakshmi Dhivya15-Dec-15 20:24 
AnswerRe: Hiding Registry Information From Readability in Assembler Pin
Daniel Pfeffer15-Dec-15 21:17
professionalDaniel Pfeffer15-Dec-15 21:17 
PraiseRe: Hiding Registry Information From Readability in Assembler Pin
David Crow16-Dec-15 2:07
David Crow16-Dec-15 2:07 
Questionhow to solve riccati equation differential in c++ or java Pin
Member 1220870815-Dec-15 2:15
Member 1220870815-Dec-15 2:15 
SuggestionRe: how to solve riccati equation differential in c++ or java Pin
Richard MacCutchan15-Dec-15 2:23
mveRichard MacCutchan15-Dec-15 2:23 
AnswerRe: how to solve riccati equation differential in c++ or java Pin
Daniel Pfeffer15-Dec-15 21:08
professionalDaniel Pfeffer15-Dec-15 21:08 
QuestionStrange compiler error Pin
ForNow14-Dec-15 6:14
ForNow14-Dec-15 6:14 
GeneralRe: Strange compiler error Pin
Richard MacCutchan14-Dec-15 6:50
mveRichard MacCutchan14-Dec-15 6:50 
GeneralRe: Strange compiler error Pin
ForNow14-Dec-15 6:58
ForNow14-Dec-15 6:58 
AnswerRe: Strange compiler error Pin
Jochen Arndt14-Dec-15 7:05
professionalJochen Arndt14-Dec-15 7:05 
QuestionProposal of a new C/C++ precompiler project Pin
Javier Luis Lopez13-Dec-15 23:52
Javier Luis Lopez13-Dec-15 23:52 
AnswerRe: Proposal of a new C/C++ precompiler project Pin
Richard MacCutchan14-Dec-15 3:12
mveRichard MacCutchan14-Dec-15 3:12 
GeneralRe: Proposal of a new C/C++ precompiler project Pin
Javier Luis Lopez14-Dec-15 21:21
Javier Luis Lopez14-Dec-15 21:21 
QuestionRe: Proposal of a new C/C++ precompiler project Pin
David Crow15-Dec-15 5:47
David Crow15-Dec-15 5:47 
AnswerRe: Proposal of a new C/C++ precompiler project Pin
Javier Luis Lopez16-Dec-15 23:26
Javier Luis Lopez16-Dec-15 23:26 

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.