Click here to Skip to main content
16,006,824 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralControl Redraw broken Pin
CaesarCZ6-Aug-02 13:05
CaesarCZ6-Aug-02 13:05 
GeneralVS 6 & XP Home & NTDLL.DLL Pin
Eldon Zacek6-Aug-02 12:20
Eldon Zacek6-Aug-02 12:20 
GeneralRe: VS 6 & XP Home & NTDLL.DLL Pin
Wolfram Steinke6-Aug-02 18:22
Wolfram Steinke6-Aug-02 18:22 
GeneralRich Text Edit Boxes Pin
Ken Mazaika6-Aug-02 12:05
Ken Mazaika6-Aug-02 12:05 
GeneralRe: Rich Text Edit Boxes Pin
Ken Mazaika6-Aug-02 12:29
Ken Mazaika6-Aug-02 12:29 
Questionhow to preallocate memory? Pin
francg6-Aug-02 11:46
francg6-Aug-02 11:46 
AnswerRe: how to preallocate memory? Pin
Tomasz Sowinski6-Aug-02 12:02
Tomasz Sowinski6-Aug-02 12:02 
AnswerRe: how to preallocate memory? Pin
alex.barylski6-Aug-02 14:54
alex.barylski6-Aug-02 14:54 
Francg wrote:
I think this means, big mem allocation will cause fragments and mucho "sizeof". Am i just on the wrong track

I think if you allocate memory all at once with a single call to new the system will try and make the memory one contigous block. So I would think thats the better way to do it when trying to avoid fragmentation.

However to allocate that much memory is probably not a good idea...a better approach(IMO) would be to allocate a segment of multiples of sizeof(double). Fill that memory and than reallocate another segment fill it up and so on. However this would be very un-efficient using new and delete so I would suggest using windows heap or virtual functions or the crt malloc/realloc/free functions.

Using the latter keeps your code more platform independent.

HTH

Cheers Smile | :)

"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
AnswerRe: how to preallocate memory? Pin
Daniel Lohmann7-Aug-02 1:21
Daniel Lohmann7-Aug-02 1:21 
QuestionHow to use CTreeCtrl::SetCheck correctly? Pin
Pachoo6-Aug-02 11:27
Pachoo6-Aug-02 11:27 
AnswerRe: How to use CTreeCtrl::SetCheck correctly? Pin
Tomasz Sowinski6-Aug-02 11:38
Tomasz Sowinski6-Aug-02 11:38 
GeneralHandle Right Click on Static Label in Dialog Pin
Aaron Schaefer6-Aug-02 10:53
Aaron Schaefer6-Aug-02 10:53 
GeneralRe: Handle Right Click on Static Label in Dialog Pin
jmkhael6-Aug-02 11:19
jmkhael6-Aug-02 11:19 
GeneralRe: Handle Right Click on Static Label in Dialog Pin
Jeremy Falcon6-Aug-02 11:20
professionalJeremy Falcon6-Aug-02 11:20 
GeneralRe: Handle Right Click on Static Label in Dialog Pin
PJ Arends6-Aug-02 16:01
professionalPJ Arends6-Aug-02 16:01 
Questionhow to get child hwnd and child object Pin
imran_rafique6-Aug-02 9:54
imran_rafique6-Aug-02 9:54 
AnswerRe: how to get child hwnd and child object Pin
Roman Nurik6-Aug-02 12:01
Roman Nurik6-Aug-02 12:01 
AnswerRe: how to get child hwnd and child object Pin
Iain Clarke, Warrior Programmer6-Aug-02 22:54
Iain Clarke, Warrior Programmer6-Aug-02 22:54 
GeneralPainting issues - Dialog controls & OCX together Pin
Gerjerts6-Aug-02 9:30
Gerjerts6-Aug-02 9:30 
GeneralInsert Into crashes, AddNew doesnt add Pin
ns6-Aug-02 9:18
ns6-Aug-02 9:18 
GeneralRe: Insert Into crashes, AddNew doesnt add Pin
Le centriste6-Aug-02 15:47
Le centriste6-Aug-02 15:47 
GeneralRe: Insert Into crashes, AddNew doesnt add Pin
ns7-Aug-02 1:14
ns7-Aug-02 1:14 
GeneralNon-Wizard CEdit Control messages Pin
JennyP6-Aug-02 9:16
JennyP6-Aug-02 9:16 
GeneralRe: Non-Wizard CEdit Control messages Pin
Tomasz Sowinski6-Aug-02 9:24
Tomasz Sowinski6-Aug-02 9:24 
GeneralWrong size with DrawImage Pin
bf6-Aug-02 7:56
bf6-Aug-02 7:56 

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.