Hi, Am Sonntag, 3. März 2013, 20:46:35 schrieb Bård Skaflestad: > On Sun, 2013-03-03 at 20:35 +0100, Håvard Berland wrote: > > Bård Skaflestad: > > > I personally think a fixed-size buffer (e.g., one megabyte) which is > > > filled through fread() and then> > > > > separately tokenised is a much better choice for the lowest > > > > > > level of a deck parser. > > > > I hope you are not suggesting that one megabyte ought to be enough for > > > > all reservoirs... > > Not at all. If I were to make such a suggestion I would have chosen a > more appropriate size. 640 MB springs to mind. My one MB suggestion > was an order of magnitude intended to balance memory consumption with > input performance. I'll happily go for five or ten, but I don't think > we need to go for buffers that are much larger than that. On the other > hand, measurements trumps assertions every time.
Just a suggestion: if you just want array-like access to the file contents, using the mmap() syscall would be an option that does not consume (much) main memory. cheers Andreas -- Andreas Lauser Department of Hydromechanics and Modelling of Hydrosystems University of Stuttgart Pfaffenwaldring 61 D-70569 Stuttgart Phone: (+49) 711 685-64719 Fax: (+49) 711 685-60430 www.hydrosys.uni-stuttgart.de _______________________________________________ Opm mailing list [email protected] http://www.opm-project.org/mailman/listinfo/opm
