[pypy-dev] ctypes create_string_buffer
HY
lightdarkadmin at 163.com
Sun Jan 12 06:28:17 CET 2014
I test 2f0d7dced731
memory isn't large engross. but at the AMD 5000+ CPU, 5 secs CPU 100%.
I think this has a BUG. :)
At 2014-01-10 22:21:07,"Armin Rigo" <arigo at tunes.org> wrote:
>Hi,
>
>On Fri, Jan 10, 2014 at 2:52 PM, Kenny Lasse Hoff Levinsen
><kennylevinsen at gmail.com> wrote:
>> On 09/01/2014, at 14.30, HY <lightdarkadmin at 163.com> wrote:
>> import ctypes as C
>> s1= "0"* 1024* 1024* 10
>> # mem engross add 10M bytes
>> b1= C.create_string_buffer(s1 )
>> # CPU 1 core 100% and mem engross add 300M bytes ?
>> I don't know!
>> please talk me, thanks very match....
>
>Fixed, thanks! It might have been a long-standing issue with memory
>in ctypes: memory was not promptly released, leading to the apparence
>of leaks.
>
>> ctypes is not nice to use. If you need C-bindings, please look at CFFI.
>
>It's true that we usually recommend to look at CFFI instead of using
>ctypes, but we still look at and fix the most obvious performance
>problems with ctypes. The goal for us is to avoid having it run
>horribly more slowly than on CPython.
>
>
>A bientôt,
>
>Armin.
More information about the pypy-dev
mailing list