Click here to Skip to main content
15,847,427 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 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 
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 
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 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 
AnswerRe: making a unsigned char array gives a buffer overrun error Pin
Stefan_Lang10-Nov-11 3:24
Stefan_Lang10-Nov-11 3:24 
QuestionMFC DLL Won't Initialise Pin
Kyudos6-Nov-11 12:59
Kyudos6-Nov-11 12:59 
AnswerRe: MFC DLL Won't Initialise Pin
Albert Holguin6-Nov-11 14:08
professionalAlbert Holguin6-Nov-11 14:08 
GeneralRe: MFC DLL Won't Initialise Pin
Kyudos6-Nov-11 16:51
Kyudos6-Nov-11 16:51 
GeneralRe: MFC DLL Won't Initialise Pin
Albert Holguin7-Nov-11 8:12
professionalAlbert Holguin7-Nov-11 8:12 
AnswerRe: MFC DLL Won't Initialise Pin
Richard Andrew x647-Nov-11 13:38
professionalRichard Andrew x647-Nov-11 13: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.