Re: releasing memory to malloc

2006-09-28 Thread iker . arizmendi
e Python objects. > > 3) Invokes a function of said C extension for further > processing. This step needs as much memory as possible. > > I'd like step 2 to return memory to the C allocator so that it > is available to the extension in step 3 (which uses malloc). > >

Re: releasing memory to malloc

2006-09-28 Thread iker . arizmendi
e. > > I'd like step 2 to return memory to the C allocator so that it > is available to the extension in step 3 (which uses malloc). > > Regards, > Iker Arizmendi -- http://mail.python.org/mailman/listinfo/python-list

Re: releasing memory to malloc

2006-09-26 Thread iker . arizmendi
I happen to have the code for the C library in question, but I don't think this is the way to go in general. If there's a way to get Python to give memory back to the C allocator I can avoid touching the library at all. Regards, Iker John Machin wrote: > [EMAIL PROTECTED] wrote: > > I can, but t

Re: releasing memory to malloc

2006-09-26 Thread iker . arizmendi
I can, but the extension is only a thin wrapper around a general purpose C library which is also used independently of Python. Iker Gabriel Genellina wrote: > Can you modify the C source? If you can, use the Python memory > allocation functions PyMem_Malloc/PyMem_Realloc/PyMem_Free. > > > > Gabr

releasing memory to malloc

2006-09-26 Thread iker . arizmendi
. Regards, Iker Arizmendi -- http://mail.python.org/mailman/listinfo/python-list

Re: popen and exit code on Windows

2006-03-07 Thread iker . arizmendi
Thanks for the reply Giovanni. Is this behaviour of the close method on Windows documented anywhere? Regards, Iker -- http://mail.python.org/mailman/listinfo/python-list

popen and exit code on Windows

2006-03-06 Thread iker . arizmendi
On UNIX one can use popen* to get a pipe for reading, a pipe for writing, and the exit code of the child process via a call to close() on the last pipe. Is there any way, in principle, to simulate such behaviour on Windows? Some googling reveals that direct use of the popen* functions on Windows wi

Adding "proxy" functions to a type

2005-05-17 Thread Iker Arizmendi
unc(rself->obj, args); printf("post call\n"); rself->realfunc = 0; return rv; } The problem here is that this doesn't work for static functions which lack a self argument, or for module level functions. Is there a better way? Thanks, Iker Arizmendi -- http://mail.python.org/mailman/listinfo/python-list

Inheriting socket handles on Windows

2005-04-27 Thread Iker Arizmendi
ever, this fails on Windows as it doesn't have the fromfd function. Aren't WinSock handles inherited by default? And if so, is there some other way to perform a listen()/accept() in this case? Regards, Iker Arizmendi -- http://mail.python.org/mailman/listinfo/python-list