Click here to Skip to main content
15,916,180 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Preprocessor Pin
David Crow27-Apr-04 10:01
David Crow27-Apr-04 10:01 
GeneralRe: Preprocessor Pin
toxcct27-Apr-04 23:20
toxcct27-Apr-04 23:20 
GeneralRe: Preprocessor Pin
Paul Ranson28-Apr-04 0:43
Paul Ranson28-Apr-04 0:43 
GeneralRe: Preprocessor Pin
Alexander M.,28-Apr-04 2:37
Alexander M.,28-Apr-04 2:37 
GeneralRe: Preprocessor Pin
David Crow29-Apr-04 3:11
David Crow29-Apr-04 3:11 
GeneralRe: Preprocessor Pin
Paul Ranson30-Apr-04 1:26
Paul Ranson30-Apr-04 1:26 
GeneralRe: Preprocessor Pin
David Crow29-Apr-04 3:08
David Crow29-Apr-04 3:08 
GeneralHelp needed: Swapping large data sets to file Pin
f.o.b27-Apr-04 4:56
f.o.b27-Apr-04 4:56 
Hi all,

I hope that somebody can help me. I have written a program which slices a 3D part into a set of 2D slices. The amount of data generated by that function can be very large (i.e. greater that 300 MB).

To save main memory I want to save these data into a file. I want to do that in a way to have a fast access to single layers. My current implementation is working like follows:

I have a list of 'int' values for every layer:
n,i1,i2,...,in

'n' is equal to the number of vertices for every layer
i1,...,in are indeces refering to co-ordinates of a corresponding points et.

By attaching all lists together I get a 'int' based representation of the layered representation of the 3D part:

n,i11,...,i1n,m,i21,...,i2m,o,i31,...,i3o,...

I save these data into a file.

To get the data for a single layer I can use the 'n','m' as offset to set the file handle to the right position. That means if I want the data of the third layer I start from the beginning and add the offset 'n'+'m'+2. The file handle is now positioned at 'o'. I use 'o' to read all data of the third layer.

This is working very well and is quite fast. But unforetunatly sometimes the software crashes. It seems that for some reasons wrong data are saved. The offsets 'n','m',... are not corresponding to the file size/lenght of 'int' list.

I have tried out to find the reason for that. This will only happen, if I save the 'int'list to a file. If I hold all data in the main memory there is no problem.

Has somebody an idea, why this is happen? Or a better idea to save main memory with a fast access to the layer data?


Ciao,

f.o.b
GeneralRe: Help needed: Swapping large data sets to file Pin
f6427-Apr-04 6:14
f6427-Apr-04 6:14 
GeneralCharge Images from a PATH Pin
Hugo_Javier_Bertorello27-Apr-04 4:52
Hugo_Javier_Bertorello27-Apr-04 4:52 
GeneralRe: Charge Images from a PATH Pin
David Crow27-Apr-04 5:38
David Crow27-Apr-04 5:38 
GeneralRe: Charge Images from a PATH Pin
PJ Arends27-Apr-04 7:00
professionalPJ Arends27-Apr-04 7:00 
GeneralSystem wide CBT-Hook reacts only to windows in creating process Pin
Nick Nougat27-Apr-04 4:05
Nick Nougat27-Apr-04 4:05 
GeneralCFormView in a Dialog Based Aplication Pin
Carlos Sánchez García27-Apr-04 4:00
Carlos Sánchez García27-Apr-04 4:00 
GeneralThere's a simple solution Pin
Nitzan Shaked27-Apr-04 4:43
Nitzan Shaked27-Apr-04 4:43 
GeneralRuntime Error Pin
rrrado27-Apr-04 3:08
rrrado27-Apr-04 3:08 
GeneralRe: Runtime Error Pin
David Crow27-Apr-04 3:15
David Crow27-Apr-04 3:15 
GeneralRe: Runtime Error Pin
rrrado27-Apr-04 3:21
rrrado27-Apr-04 3:21 
GeneralRe: Runtime Error Pin
David Crow27-Apr-04 3:28
David Crow27-Apr-04 3:28 
GeneralRe: Runtime Error Pin
rrrado27-Apr-04 3:32
rrrado27-Apr-04 3:32 
GeneralRe: Runtime Error Pin
David Crow27-Apr-04 3:44
David Crow27-Apr-04 3:44 
GeneralRe: Runtime Error Pin
rrrado27-Apr-04 4:00
rrrado27-Apr-04 4:00 
GeneralRe: Runtime Error Pin
David Crow27-Apr-04 4:07
David Crow27-Apr-04 4:07 
GeneralRe: Runtime Error Pin
Paul Ranson27-Apr-04 4:55
Paul Ranson27-Apr-04 4:55 
GeneralRe: Runtime Error Pin
rrrado27-Apr-04 5:13
rrrado27-Apr-04 5:13 

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.