At Fri, 5 Jan 2007 07:56:21 +0100, Marco Maggi wrote: > I wonder if someone can suggest me a somewhat efficient > way to handle memory allocation and result storage for > 'gsl_odeiv_evolve_apply()' micro steps results.
Hello, I think the simplest way is to use realloc to grow a block of memory as required (doubling is a reasonable strategy) and then create a matrix view of it at the end. If there is a risk of running out of memory you could write the results to a file in binary format as they are generated and then mmap() it. In the GNU C library there is a feature called obstacks which handles fast growing objects of unknown size, but it may be more complicated than you need. -- Brian Gough Network Theory Ltd, Publishing Free Software Manuals --- http://www.network-theory.co.uk/ _______________________________________________ Help-gsl mailing list Help-gsl@gnu.org http://lists.gnu.org/mailman/listinfo/help-gsl