On Fri, 31 Dec 2004, [iso-8859-1] Göran Broström wrote:
Regarding 2., I tried the combination vmaxget + Calloc + vmaxset, ie, I
began my function with vmax = vmaxget() and ended it with
vmaxset(vmax). The point with this is that you can free all allocated
memory with one call instead of repeated ca
On Thu, Dec 30, 2004 at 02:28:49PM -0800, Thomas Lumley wrote:
> On Thu, 30 Dec 2004, [iso-8859-1] Göran Broström wrote:
>
> >On Thu, Dec 30, 2004 at 08:01:41AM -0800, Thomas Lumley wrote:
> >>On Thu, 30 Dec 2004, [iso-8859-1] Göran Broström wrote:
> >>>
> >>>However, and that is my question/sugge
On Thu, 30 Dec 2004, [iso-8859-1] Göran Broström wrote:
On Thu, Dec 30, 2004 at 08:01:41AM -0800, Thomas Lumley wrote:
On Thu, 30 Dec 2004, [iso-8859-1] Göran Broström wrote:
However, and that is my question/suggestion: Why not use Calloc+Free
instead of R_alloc in vmmin (and maybe in other places)
On Thu, Dec 30, 2004 at 08:01:41AM -0800, Thomas Lumley wrote:
> On Thu, 30 Dec 2004, [iso-8859-1] Göran Broström wrote:
> >
> >However, and that is my question/suggestion: Why not use Calloc+Free
> >instead of R_alloc in vmmin (and maybe in other places)? I made the
> >changes in 'optim.c' in the
On Thu, Dec 30, 2004 at 04:27:59PM +, Prof Brian Ripley wrote:
> On Thu, 30 Dec 2004, Thomas Lumley wrote:
>
> >On Thu, 30 Dec 2004, [iso-8859-1] Göran Broström wrote:
> >>
> >>However, and that is my question/suggestion: Why not use Calloc+Free
> >>instead of R_alloc in vmmin (and maybe in ot
On Thu, 30 Dec 2004, Thomas Lumley wrote:
On Thu, 30 Dec 2004, [iso-8859-1] Göran Broström wrote:
However, and that is my question/suggestion: Why not use Calloc+Free
instead of R_alloc in vmmin (and maybe in other places)? I made the
changes in 'optim.c' in the functions 'vmmin' and 'Lmatrix'. The
On Thu, Dec 30, 2004 at 08:01:41AM -0800, Thomas Lumley wrote:
> On Thu, 30 Dec 2004, [iso-8859-1] Göran Broström wrote:
> >
> >However, and that is my question/suggestion: Why not use Calloc+Free
> >instead of R_alloc in vmmin (and maybe in other places)? I made the
> >changes in 'optim.c' in the
On Thu, 30 Dec 2004, [iso-8859-1] Göran Broström wrote:
However, and that is my question/suggestion: Why not use Calloc+Free
instead of R_alloc in vmmin (and maybe in other places)? I made the
changes in 'optim.c' in the functions 'vmmin' and 'Lmatrix'. Then I rebuilt
and reinstalled R-2.0.1. The r
I am calling 'vmmin' several times from a C function (which is called via
.C). It works very well, except for memory consumption. The cause is that
vmmin allocates memory via R_alloc, and this memory is not freed as vmmin
exits. Instead all the allocated memory is freed on return of the .C
call.