Click here to Skip to main content
16,004,944 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionMemory allocation problem?? Pin
pavanbabut28-Jul-06 7:30
pavanbabut28-Jul-06 7:30 
AnswerRe: Memory allocation problem?? Pin
Zac Howland28-Jul-06 7:51
Zac Howland28-Jul-06 7:51 
GeneralRe: Memory allocation problem?? Pin
pavanbabut28-Jul-06 8:51
pavanbabut28-Jul-06 8:51 
GeneralRe: Memory allocation problem?? Pin
Zac Howland28-Jul-06 9:16
Zac Howland28-Jul-06 9:16 
GeneralRe: Memory allocation problem?? Pin
pavanbabut28-Jul-06 9:32
pavanbabut28-Jul-06 9:32 
GeneralRe: Memory allocation problem?? Pin
Zac Howland28-Jul-06 9:46
Zac Howland28-Jul-06 9:46 
GeneralRe: Memory allocation problem?? Pin
pavanbabut1-Aug-06 5:32
pavanbabut1-Aug-06 5:32 
GeneralRe: Memory allocation problem?? Pin
Blake Miller1-Aug-06 12:44
Blake Miller1-Aug-06 12:44 
Well, here's your problem:
fwrite(&dataA, sizeof(int), 1, streamA[0] );

You need to reorganize this into a single write - have your buffers as a coninuous block of bytes and do the single operation in a single WriteFile call.

Also, try using CreateFile, Readfile, and WriteFile and avoid the 'C' functions, which have to get decoded into one of the other three calls anyways.

I usually have two layers in a case like this:
Aquisition -> Buffer Writes
Buffer Read -> Disk Writes

You just need to synchronize the access t your 'buffer pointers' between the threads.
Only two threads required, one doing IO and one doing disk writes.

Also, defragment hte hard drive frequently and defragment the paging file.
Turn off the Virus Scnaner if possible, at least on the folder doing the disk IO.



Any sufficiently gross incompetence is nearly indistinguishable from malice.

GeneralRe: Memory allocation problem?? Pin
pavanbabut2-Aug-06 9:40
pavanbabut2-Aug-06 9:40 
GeneralRe: Memory allocation problem?? Pin
Blake Miller2-Aug-06 10:29
Blake Miller2-Aug-06 10:29 
GeneralRe: Memory allocation problem?? Pin
pavanbabut2-Aug-06 13:48
pavanbabut2-Aug-06 13:48 
Questionnewbie requires guidance on named pipe application Pin
eeyor66628-Jul-06 6:31
eeyor66628-Jul-06 6:31 
QuestionHow to set a JPG image to a dialog background ? Pin
Vinod Sankaranarayanan28-Jul-06 6:25
Vinod Sankaranarayanan28-Jul-06 6:25 
AnswerRe: How to set a JPG image to a dialog background ? Pin
Hamid_RT28-Jul-06 6:57
Hamid_RT28-Jul-06 6:57 
GeneralRe: How to set a JPG image to a dialog background ? Pin
Vinod Sankaranarayanan28-Jul-06 19:21
Vinod Sankaranarayanan28-Jul-06 19:21 
GeneralRe: How to set a JPG image to a dialog background ? Pin
Hamid_RT28-Jul-06 21:55
Hamid_RT28-Jul-06 21:55 
Questiontootip for win32 window Pin
Manjunath S28-Jul-06 6:17
Manjunath S28-Jul-06 6:17 
AnswerRe: tootip for win32 window Pin
David Crow28-Jul-06 7:18
David Crow28-Jul-06 7:18 
AnswerRe: tootip for win32 window Pin
Hamid_RT28-Jul-06 7:20
Hamid_RT28-Jul-06 7:20 
QuestionHow to read/write a word from/to a certain physical address in the VC++ 6.0 environment? Pin
zhoufanking28-Jul-06 5:57
zhoufanking28-Jul-06 5:57 
QuestionRe: How to read/write a word from/to a certain physical address in the VC++ 6.0 environment? Pin
David Crow28-Jul-06 7:13
David Crow28-Jul-06 7:13 
AnswerRe: How to read/write a word from/to a certain physical address in the VC++ 6.0 environment? Pin
zhoufanking28-Jul-06 12:52
zhoufanking28-Jul-06 12:52 
GeneralRe: How to read/write a word from/to a certain physical address in the VC++ 6.0 environment? Pin
Gary R. Wheeler28-Jul-06 16:08
Gary R. Wheeler28-Jul-06 16:08 
AnswerRe: How to read/write a word from/to a certain physical address in the VC++ 6.0 environment? Pin
A_Fa28-Jul-06 18:51
A_Fa28-Jul-06 18:51 
QuestionVPN Pin
Sean Dastouri28-Jul-06 5:49
Sean Dastouri28-Jul-06 5:49 

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.