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

C / C++ / MFC

 
GeneralRe: MouseHover effect on ListBox Pin
Code-o-mat8-Jul-10 21:34
Code-o-mat8-Jul-10 21:34 
Questionmalloc limitations Pin
rupeshkp7288-Jul-10 2:25
rupeshkp7288-Jul-10 2:25 
AnswerRe: malloc limitations Pin
Niklas L8-Jul-10 2:29
Niklas L8-Jul-10 2:29 
GeneralRe: malloc limitations Pin
rupeshkp7288-Jul-10 2:32
rupeshkp7288-Jul-10 2:32 
GeneralRe: malloc limitations Pin
Naveen8-Jul-10 3:25
Naveen8-Jul-10 3:25 
AnswerRe: malloc limitations Pin
David Crow8-Jul-10 3:11
David Crow8-Jul-10 3:11 
AnswerRe: malloc limitations Pin
rupeshkp7288-Jul-10 3:22
rupeshkp7288-Jul-10 3:22 
AnswerRe: malloc limitations Pin
Aescleal8-Jul-10 4:59
Aescleal8-Jul-10 4:59 
That's a bit like asking "how long is a piece of string?"

Here's why...

- Every process is given it's own address space to run in. Depending on where the OS and compiler conspire to load your code will determine the largest lump of memory you can allocate

- The OS may allocated loads of other guff which will restrict where the compiler can stick it's heap

- The OS may have extra overheads managing it's heap (e.g. Windows having different heaps for different size ranges of allocation)

- How malloc is implemented on top of the underlying OS can also mess things up

- The computer may not have enough disk space or memory to service your request

So to find out how much you can allocate try it! Do a malloc for INT_MAX bytes and if that fails divide the size by 2 and try again. You can use something a bit more sophisticated but you really need to try it on a particular system with a given compiler and load to see what happens.

Cheers,

Ash
GeneralRe: malloc limitations Pin
rupeshkp7288-Jul-10 5:55
rupeshkp7288-Jul-10 5:55 
Questionhash tables concepts Pin
rupeshkp7288-Jul-10 2:21
rupeshkp7288-Jul-10 2:21 
AnswerRe: hash tables concepts Pin
Chris Losinger8-Jul-10 2:24
professionalChris Losinger8-Jul-10 2:24 
GeneralRe: hash tables concepts Pin
rupeshkp7288-Jul-10 2:27
rupeshkp7288-Jul-10 2:27 
QuestionApplication Crash Pin
T.RATHA KRISHNAN8-Jul-10 1:19
T.RATHA KRISHNAN8-Jul-10 1:19 
AnswerRe: Application Crash PinPopular
Code-o-mat8-Jul-10 1:23
Code-o-mat8-Jul-10 1:23 
AnswerRe: Application Crash Pin
Cedric Moonen8-Jul-10 1:26
Cedric Moonen8-Jul-10 1:26 
AnswerRe: Application Crash Pin
Aescleal8-Jul-10 1:57
Aescleal8-Jul-10 1:57 
QuestionMessage Removed Pin
8-Jul-10 0:56
gmallax8-Jul-10 0:56 
AnswerRe: load string Pin
CPallini8-Jul-10 1:01
mveCPallini8-Jul-10 1:01 
QuestionMessage Removed Pin
7-Jul-10 22:38
T.RATHA KRISHNAN7-Jul-10 22:38 
AnswerRe: Copying Array elements to a Structure Pin
Cedric Moonen7-Jul-10 22:39
Cedric Moonen7-Jul-10 22:39 
GeneralRe: Copying Array elements to a Structure Pin
T.RATHA KRISHNAN7-Jul-10 22:46
T.RATHA KRISHNAN7-Jul-10 22:46 
GeneralRe: Copying Array elements to a Structure Pin
Cedric Moonen7-Jul-10 22:50
Cedric Moonen7-Jul-10 22:50 
AnswerRe: Copying Array elements to a Structure Pin
Niklas L7-Jul-10 22:46
Niklas L7-Jul-10 22:46 
QuestionData Source connection Pin
raju_shiva7-Jul-10 22:31
raju_shiva7-Jul-10 22:31 
AnswerRe: Data Source connection Pin
Niklas L7-Jul-10 22:38
Niklas L7-Jul-10 22:38 

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.