Click here to Skip to main content
15,847,427 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Albert Holguin7-Nov-11 8:23
professionalAlbert Holguin7-Nov-11 8:23 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Erudite_Eric7-Nov-11 8:41
Erudite_Eric7-Nov-11 8:41 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Albert Holguin7-Nov-11 8:45
professionalAlbert Holguin7-Nov-11 8:45 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Erudite_Eric7-Nov-11 9:05
Erudite_Eric7-Nov-11 9:05 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Albert Holguin7-Nov-11 9:24
professionalAlbert Holguin7-Nov-11 9:24 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Erudite_Eric7-Nov-11 21:57
Erudite_Eric7-Nov-11 21:57 
AnswerRe: making a unsigned char array gives a buffer overrun error Pin
Chuck O'Toole8-Nov-11 3:04
Chuck O'Toole8-Nov-11 3:04 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Erudite_Eric8-Nov-11 23:02
Erudite_Eric8-Nov-11 23:02 
I dont know if you followed the rest of this thread but what I recomended was using the heap so that verifier can see where your buffers are getting overrun, then go back to using a stack buffer when the code is good.


Yes, heap allocaiton is slow, thats why preallocaiton is a good idea for frequently used memory blocks of a known size. Look aside lists for example. I mentioned this too. This obviattes any performance issues.

What you say about locking mecnahisms isnt the case though. The memory manager deals with that, not the code, so it doesnt add complication. Shared data between threads will though, but this wont be the case here since the guy is only using the buffer in one function.

Re kernel performance, look aside lists. Plus IO is the real bottle neck.

But here is my central point, whic is always valid: Stability is more imporant than speed. Always.
==============================

Nothing to say.

GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Albert Holguin9-Nov-11 5:03
professionalAlbert Holguin9-Nov-11 5:03 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Chuck O'Toole9-Nov-11 5:16
Chuck O'Toole9-Nov-11 5:16 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Erudite_Eric9-Nov-11 23:50
Erudite_Eric9-Nov-11 23:50 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Albert Holguin10-Nov-11 12:51
professionalAlbert Holguin10-Nov-11 12:51 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Erudite_Eric9-Nov-11 23:50
Erudite_Eric9-Nov-11 23:50 
AnswerRe: making a unsigned char array gives a buffer overrun error Pin
Chuck O'Toole9-Nov-11 5:15
Chuck O'Toole9-Nov-11 5:15 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Erudite_Eric9-Nov-11 23:54
Erudite_Eric9-Nov-11 23:54 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Albert Holguin8-Nov-11 3:48
professionalAlbert Holguin8-Nov-11 3:48 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Erudite_Eric8-Nov-11 23:04
Erudite_Eric8-Nov-11 23:04 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
User 5838527-Nov-11 16:53
User 5838527-Nov-11 16:53 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Erudite_Eric7-Nov-11 21:53
Erudite_Eric7-Nov-11 21:53 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
User 5838527-Nov-11 22:14
User 5838527-Nov-11 22:14 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Albert Holguin8-Nov-11 3:51
professionalAlbert Holguin8-Nov-11 3:51 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Erudite_Eric7-Nov-11 8:45
Erudite_Eric7-Nov-11 8:45 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Albert Holguin7-Nov-11 8:47
professionalAlbert Holguin7-Nov-11 8:47 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Erudite_Eric7-Nov-11 9:10
Erudite_Eric7-Nov-11 9:10 
AnswerRe: making a unsigned char array gives a buffer overrun error Pin
Albert Holguin7-Nov-11 8:22
professionalAlbert Holguin7-Nov-11 8:22 

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.