halting problem :)
Alan Turing
at at bletchley.park.uk
Tue Jan 27 08:04:30 PST 2009
Maybe I can help...
Saaa Wrote:
> My program doesn't exit..
>
> void main()
> {
>
> ..
> Data data[]
>
> createData(data);
> //This proces takes a minute or two.
> //data now holds about 700000 Data elements
>
> writefln(`Creating buffer`);
> ubyte[] buffer;
> for (int i=0; i<data.length; i++)
> {
> buffer~=format(data[i].net,`,`,data[i].name,`,`,to!(int[])(data[i].output),`,`,to!(int[])(data[i].input),newline);
> //This takes like a minute and has a peak memory usage of 680MB
> }
>
> writefln(`Writing file`);
> std.file.write(outFilename, buffer);
> writefln(`Writing file finished`);
>
> //The file is readily made and delta memory usage shows a few a few times
> around 20MB
> //but the program doesn't stop, although 'Writing file finished' is shown.
> //there is no static this or alike.
> //and after 10 minutes the memory usage is about 370MB and slowly going up
> //ctrl-c doesn't work anymore as well
> }
>
>
More information about the Digitalmars-d-learn
mailing list