[sage-devel] Re: [Cython] Locally scoped dynamic memory (in SAGE and elsewhere)

2008-04-10 Thread Michael.Abshoff
Brian Granger wrote: Hi Brian, >> Well, in the end you end up using sbrk() anyway, but I don't see what is >> wrong with malloc itself? sage_malloc was introduced a while back to >> make it possible to switch to a slab allocator like omalloc potentially >> to see if there is any benefit from

[sage-devel] Re: [Cython] Locally scoped dynamic memory (in SAGE and elsewhere)

2008-04-10 Thread Brian Granger
> Well, in the end you end up using sbrk() anyway, but I don't see what is > wrong with malloc itself? sage_malloc was introduced a while back to > make it possible to switch to a slab allocator like omalloc potentially > to see if there is any benefit from it. And that makes sense. > Abso

[sage-devel] Re: [Cython] Locally scoped dynamic memory (in SAGE and elsewhere)

2008-04-10 Thread William Stein
On Thu, Apr 10, 2008 at 10:02 AM, Michael.Abshoff <[EMAIL PROTECTED]> wrote: > > > But, test test suite doesn't test for all of the odd input that users > > will feed to sage. These are the cases that will leak memory and > > there is not possible way to test for all of them. Also debugging >

[sage-devel] Re: [Cython] Locally scoped dynamic memory (in SAGE and elsewhere)

2008-04-10 Thread William Stein
On Thu, Apr 10, 2008 at 10:12 AM, Brian Granger <[EMAIL PROTECTED]> wrote: > > (I'm not on the SAGE list so not dual-posting) > > > > > A few of us (ipython and mpi4py devs) are wondering what the > > > best/safest way of allocating dynamic memory in a local scope > > > (method/function) is

[sage-devel] Re: [Cython] Locally scoped dynamic memory (in SAGE and elsewhere)

2008-04-10 Thread Michael.Abshoff
Brian Granger wrote: > On Thu, Apr 10, 2008 at 10:27 AM, Michael.Abshoff > <[EMAIL PROTECTED]> wrote: >> Brian Granger wrote: >> >>> Hi, >>> >> Hi Brian, >> >> Hi Brian, >> >>> (dual posted to sage and cython) >>> >>> A few of us (ipython and mpi4py devs) are wondering what the >>> best/safest

[sage-devel] Re: [Cython] Locally scoped dynamic memory (in SAGE and elsewhere)

2008-04-10 Thread Brian Granger
On Thu, Apr 10, 2008 at 10:27 AM, Michael.Abshoff <[EMAIL PROTECTED]> wrote: > Brian Granger wrote: > > > Hi, > > > > Hi Brian, > > > > > (dual posted to sage and cython) > > > > A few of us (ipython and mpi4py devs) are wondering what the > > best/safest way of allocating dynamic memory in a loc

[sage-devel] Re: [Cython] Locally scoped dynamic memory (in SAGE and elsewhere)

2008-04-10 Thread William Stein
On Thu, Apr 10, 2008 at 9:27 AM, Michael.Abshoff <[EMAIL PROTECTED]> wrote: > > Brian Granger wrote: > > Hi, > > Hi Brian, > > > > (dual posted to sage and cython) > > > > A few of us (ipython and mpi4py devs) are wondering what the > > best/safest way of allocating dynamic memory in a loca

[sage-devel] Re: [Cython] Locally scoped dynamic memory (in SAGE and elsewhere)

2008-04-10 Thread Michael.Abshoff
Brian Granger wrote: > Hi, Hi Brian, > (dual posted to sage and cython) > > A few of us (ipython and mpi4py devs) are wondering what the > best/safest way of allocating dynamic memory in a local scope > (method/function) is when using cython. An example would be if you > need an array of c int