lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] lwip, mqtt and mbedtls


From: Manu Abraham
Subject: Re: [lwip-users] lwip, mqtt and mbedtls
Date: Sun, 23 Aug 2020 02:57:53 +0530

Hi Simon,

TLS alone does work as expected. I can see the SSL handshake as well.
but when I do use altcp in conjunction with the same, things do not
seem to fare well.

I dont think the RAM size has anything to do with. The controller that
i am dealing
with, an STM32H7 has a comparatively larger memory in comparison to most of the
controllers.

I was told that continuous create and free of dynamic memory (heap) causes the
memory to get fragmented. This eventually causes the freeze.
The issue exists for other situations as well.

https://community.arm.com/developer/tools-software/tools/f/keil-forum/37721/heap-monitoring

"Continuous allocation and deallocation of dynamic memory causes
the heap to become fragmented. That could be reason of hang in the
operator new. RTX RTOS don't have background garbage collector
and better way here is use static objects."

I see that the altcp layering in addition to the stack is doing a lot
of _new() and delete()
which *might* seems to explain the situation.

Probably a static allocation would be better.

Thanks,

Manu


On Fri, Aug 21, 2020 at 2:31 AM goldsimon <goldsimon@gmx.de> wrote:
>
>
>
> Manu Abraham wrote:
> > [..]
> >  #error "lwip_sanity_check: WARNING: TCP_WND is larger than space
> >provided by PBUF_POOL_SIZE * (PBUF_POOL_BUFSIZE - protocol headers).
> >If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS
> >to 1 to disable this error."
> >
> >So, What should be done ?
> >
> >Am I going on the right track, or something is wrong somewhere ?
>
> I think so. TLS has this far only been used in setups with relatively large 
> RAM settings. It could be tweaked, but you'd have to know what you're doing. 
> The current compile time checks are there to help you to not get stuck in the 
> middle of a transfer because you're out of memory. That doesn't mean you 
> always need all memory...
>
> Regards,
> Simon
>
> _______________________________________________
> lwip-users mailing list
> lwip-users@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/lwip-users



reply via email to

[Prev in Thread] Current Thread [Next in Thread]