Click here to Skip to main content
15,899,679 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: making a unsigned char array gives a buffer overrun error Pin
Chuck O'Toole8-Nov-11 2:04
Chuck O'Toole8-Nov-11 2:04 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Erudite_Eric8-Nov-11 22:02
Erudite_Eric8-Nov-11 22:02 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Albert Holguin9-Nov-11 4:03
professionalAlbert Holguin9-Nov-11 4:03 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Chuck O'Toole9-Nov-11 4:16
Chuck O'Toole9-Nov-11 4:16 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Erudite_Eric9-Nov-11 22:50
Erudite_Eric9-Nov-11 22:50 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Albert Holguin10-Nov-11 11:51
professionalAlbert Holguin10-Nov-11 11:51 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Erudite_Eric9-Nov-11 22:50
Erudite_Eric9-Nov-11 22:50 
AnswerRe: making a unsigned char array gives a buffer overrun error Pin
Chuck O'Toole9-Nov-11 4:15
Chuck O'Toole9-Nov-11 4:15 
This is why I don't like jumping into someelse's argument, it becomes mine Frown | :(

Yes, I've followed the posts and just to be sure, I went back and re-read all of yours specifically (you should do the same to refresh your memory). You never mention going back to a stack buffer "after the code is good". In fact, quite the opposite, you were adament about buffers always being from the heap, always, always. You repeated that quite often. So the resposes where to those statements.
Erudite__Eric wrote:
What you say about locking mecnahisms isnt the case though. The memory manager
deals with that, not the code, so it doesnt add complication.

Well that's a convenient hand wave, blaming the underlying function rather than the caller who invokes it. The point is that memory allocation at that level is costly and that even if the "memory manager" has to deal with the locking, etc, you still are resposible for chosing a methodology that invokes that call over stack allocation. So, the introduction of the overhead is your choice, the kernel code is just giving you what you asked for. Don't blame it.
Erudite__Eric wrote:
Plus IO is the real bottle neck
IO is a "wait state" event and not chewing up cpu cycles, which was what this discussion was all about. The kernel / application is free to do other things while IO is going on using any number of asynchronous IO techniques. If you wish to now have a discussion on all the things that affect application / kernel performance, we can do that too.
Erudite__Eric wrote:
Stability is more imporant than speed. Always.
Only an idiot would argue in favor of "instability". Of course stability is important. In fact, if you're getting paid to do code, your client / employer will assume stability and will find someone else to deliver it if you fail. So most don't even bother listing stability as a priority, it's assumed you will deliver it. On the other hand, many will list speed as the priority, depending on the application. Imagine trying to defend a radar application that is too slow to catch all the incoming phase radar data by saying "but it's stable!!".
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Erudite_Eric9-Nov-11 22:54
Erudite_Eric9-Nov-11 22:54 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Albert Holguin8-Nov-11 2:48
professionalAlbert Holguin8-Nov-11 2:48 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Erudite_Eric8-Nov-11 22:04
Erudite_Eric8-Nov-11 22:04 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
User 5838527-Nov-11 15:53
User 5838527-Nov-11 15:53 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Erudite_Eric7-Nov-11 20:53
Erudite_Eric7-Nov-11 20:53 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
User 5838527-Nov-11 21:14
User 5838527-Nov-11 21:14 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Albert Holguin8-Nov-11 2:51
professionalAlbert Holguin8-Nov-11 2:51 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Erudite_Eric7-Nov-11 7:45
Erudite_Eric7-Nov-11 7:45 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Albert Holguin7-Nov-11 7:47
professionalAlbert Holguin7-Nov-11 7:47 
GeneralRe: making a unsigned char array gives a buffer overrun error Pin
Erudite_Eric7-Nov-11 8:10
Erudite_Eric7-Nov-11 8:10 
AnswerRe: making a unsigned char array gives a buffer overrun error Pin
Albert Holguin7-Nov-11 7:22
professionalAlbert Holguin7-Nov-11 7:22 
AnswerRe: making a unsigned char array gives a buffer overrun error Pin
Stefan_Lang10-Nov-11 2:24
Stefan_Lang10-Nov-11 2:24 
QuestionMFC DLL Won't Initialise Pin
Kyudos6-Nov-11 11:59
Kyudos6-Nov-11 11:59 
AnswerRe: MFC DLL Won't Initialise Pin
Albert Holguin6-Nov-11 13:08
professionalAlbert Holguin6-Nov-11 13:08 
GeneralRe: MFC DLL Won't Initialise Pin
Kyudos6-Nov-11 15:51
Kyudos6-Nov-11 15:51 
GeneralRe: MFC DLL Won't Initialise Pin
Albert Holguin7-Nov-11 7:12
professionalAlbert Holguin7-Nov-11 7:12 
AnswerRe: MFC DLL Won't Initialise Pin
Richard Andrew x647-Nov-11 12:38
professionalRichard Andrew x647-Nov-11 12: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.