Click here to Skip to main content
15,843,727 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Why -nan values appear Pin
Jochen Arndt4-Dec-17 8:01
professionalJochen Arndt4-Dec-17 8:01 
AnswerRe: Why -nan values appear Pin
k50544-Dec-17 8:05
mvek50544-Dec-17 8:05 
GeneralRe: Why -nan values appear Pin
Peter_in_27805-Dec-17 13:50
professionalPeter_in_27805-Dec-17 13:50 
AnswerRe: Why -nan values appear Pin
David Crow4-Dec-17 9:58
David Crow4-Dec-17 9:58 
AnswerRe: Why -nan values appear Pin
CPallini4-Dec-17 23:26
mveCPallini4-Dec-17 23:26 
QuestionStorage Allocation Pin
ForNow3-Dec-17 7:13
ForNow3-Dec-17 7:13 
AnswerRe: Storage Allocation Pin
CPallini3-Dec-17 10:35
mveCPallini3-Dec-17 10:35 
AnswerRe: Storage Allocation Pin
jschell5-Dec-17 12:51
jschell5-Dec-17 12:51 
ForNow wrote:
But I "THINK" even if I do a HeapAlloc for 20 byes it really gets 1K

I don't know if this better than using new


There is a very specific reason for using HeapAlloc and nothing you posted suggests you need that.

And not a good idea to attempt to circumvent C++ compiler allocations unless you have identified a specific need and you understand exactly how allocations work.

If you have some limited need or just want to mess around then you can override allocations for a specific class (one class only) and control it in fine detail. And do so knowing that you are not as likely to mess up the rest of the application doing it.

Alternatively find several open source allocators and heaps and examine how they are implemented first to understand what happens with heaps.

Keep in mind that if you do attempt to control your own allocations you can completely destroy the application (runtime) because you can end up overwriting memory that has nothing to do with what you think it should. So do it very carefully.
GeneralRe: Storage Allocation Pin
ForNow5-Dec-17 13:52
ForNow5-Dec-17 13:52 
GeneralRe: Storage Allocation Pin
jschell8-Dec-17 7:58
jschell8-Dec-17 7:58 
GeneralRe: Storage Allocation Pin
ForNow8-Dec-17 9:08
ForNow8-Dec-17 9:08 
GeneralRe: Storage Allocation Pin
jschell8-Dec-17 14:07
jschell8-Dec-17 14:07 
QuestionException in CListBox::Addstring Pin
ForNow1-Dec-17 3:07
ForNow1-Dec-17 3:07 
AnswerRe: Exception in CListBox::Addstring Pin
Jochen Arndt1-Dec-17 3:47
professionalJochen Arndt1-Dec-17 3:47 
GeneralRe: Exception in CListBox::Addstring Pin
ForNow1-Dec-17 3:58
ForNow1-Dec-17 3:58 
GeneralRe: Exception in CListBox::Addstring Pin
Jochen Arndt1-Dec-17 5:18
professionalJochen Arndt1-Dec-17 5:18 
GeneralRe: Exception in CListBox::Addstring Pin
ForNow1-Dec-17 6:04
ForNow1-Dec-17 6:04 
GeneralRe: Exception in CListBox::Addstring Pin
Victor Nijegorodov1-Dec-17 10:34
Victor Nijegorodov1-Dec-17 10:34 
AnswerRe: Exception in CListBox::Addstring Pin
Richard MacCutchan1-Dec-17 3:47
mveRichard MacCutchan1-Dec-17 3:47 
GeneralRe: Exception in CListBox::Addstring Pin
ForNow1-Dec-17 3:53
ForNow1-Dec-17 3:53 
GeneralRe: Exception in CListBox::Addstring Pin
Richard MacCutchan1-Dec-17 4:09
mveRichard MacCutchan1-Dec-17 4:09 
GeneralRe: Exception in CListBox::Addstring Pin
ForNow1-Dec-17 4:13
ForNow1-Dec-17 4:13 
QuestionMatrix not getting initialized Pin
User 1350945030-Nov-17 9:38
professionalUser 1350945030-Nov-17 9:38 
AnswerRe: Matrix not getting initialized Pin
CPallini30-Nov-17 11:37
mveCPallini30-Nov-17 11:37 
GeneralRe: Matrix not getting initialized Pin
User 1350945030-Nov-17 23:00
professionalUser 1350945030-Nov-17 23:00 

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.