Subject: memory handling patch

From: Bernhard Reiter <[email-masked]>
Date: Sat, 19 May 2001 23:03:04 +0200

Hi friends of statist,

There is a new patch for statist which you should try.
For easy of downloading I have put it in the contrib directory, 
though I did it myself. :)

	http://www.usf.uos.de/~breiter/tools/statist/v1.0.0/contrib/

Thanks to the efforts of Masao KAWAMURA <[email-masked]>
and his patch I found a couple of memory handling problems probably
still originating from Dirk. :)
Tried to make memory handling more consistant, 
this should fix some problems.

Everybody should test this patch and the other ones if you get a
chance because I plan to release it as the next stable version of statist.
It needs some testing because memory handling is always critical.

Here is the changelog to the patch:

* cleanup: removed alread inactived myfopen() from the code completly
* cleanup: grouped memory functions in statist.c and added short describtions
* cleanup: simplified free_ptr() to use the global int n_ptr
* fix: reworked memory handling, only the functions mycalloc, myalloc 
	and myfree() are used now. A couple of free()s where too much.
        Thanks to KAWAMURA Masao <[email-masked]> and his patch
        for pointing me to the problem.
* note: in funcs.c, mycalloc() and myfree() are used to get a
        huge bunch of memory in get_cross_validate() and
        get_multiple_reg(), usually m_calloc() would be used
        and limiting the number of temp variables allocated...

Bernhard

-- 
Professional Service around Free Software                (intevation.net)  
The FreeGIS Project                                         (freegis.org)
Association for a Free Informational Infrastructure            (ffii.org)
FSF Europe                                            	  (fsfeurope.org)

---

From: Bernhard Reiter <[email-masked]>
Date: Thu, 24 May 2001 17:53:44 +0200

> this should fix some problems.

Masao fixed another two quirks and cleaned up the code, so there
is another patch for memory handling to be applied after the first one.

Note that the functions get_cross_validate() and get_multiple_reg(),
are not bound to the limit of #define MPTR 60, but the other
functions still are.

I still have to think a bit about just removing this limit
altogether in the future. For now you can boost MPTR in statist.h
if you like.

	Bernhard