Re: [Rd] optim/vmmin and R_alloc

2004-12-31 Thread Göran Broström
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/suggestion: Why not

Re: [Rd] optim/vmmin and R_alloc

2004-12-31 Thread Thomas Lumley
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

Re: [Rd] optim/vmmin and R_alloc

2004-12-30 Thread Thomas Lumley
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

Re: [Rd] optim/vmmin and R_alloc

2004-12-30 Thread Göran Broström
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

Re: [Rd] optim/vmmin and R_alloc

2004-12-30 Thread Prof Brian Ripley
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'.

Re: [Rd] optim/vmmin and R_alloc

2004-12-30 Thread Göran Broström
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 other places)?

Re: [Rd] optim/vmmin and R_alloc

2004-12-30 Thread Göran Broström
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

Re: [Rd] optim/vmmin and R_alloc

2004-12-30 Thread Thomas Lumley
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