Subject: Re: Libssh2: Memory Allocation Failure

Re: Libssh2: Memory Allocation Failure

From: Paul Romero <paulr_at_rcom-software.com>
Date: Fri, 10 Sep 2010 08:55:55 -0700

Hi Daniel:

What you wrote seems reasonable. I ran the test again
for a much longer period in an i86 environment and no
memory allocation failures occurred. Of course, the
uClinux environment has much less spare memory--
a little more than 2 MB. I think it is relevant that
no other tasks--other than uClinux system background
tasks, were running when I ran the test on uClinux.

Best Regards,

Paul R.

Daniel Stenberg wrote:

> On Thu, 9 Sep 2010, Paul Romero wrote:
>
> > Thanks. In fact the test does free all connections in between transactions.
>
> libssh2 is not easy on the heap. It allocates and frees a lot of memory chunks
> and if your app does it as well, chances are that the memory pools are so
> fragmented that there isn't any large enough blocks left when libssh2 wants
> one.
>
> I've been wanting to reduce the amount of mallocs but I've not yet gotten
> around actually making that reality...
>
> --
>
> / daniel.haxx.se
> _______________________________________________
> libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

--
Paul Romero
RCOM Communications Software
Phone/Fax: (510)339-2628
E-Mail: paulr_at_rcom-software.com
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-09-10