Hi Glen,

Am 16.09.2016 um 04:13 schrieb glen english:
> Hi Danilo
> Yeah, I guess being a very bare metal programmer from the old 128 byte
> RAM days, , I dislike MALLOCs in embedded code on principal.
Well. Although I also remember that are and in general do not like 
malloc being used by someone not knowing what she/he does,
it does have its fair use cases.
> However, because the heap usage would be deterministic, it should be
> fairly safe.
However, using stack is okay by me, makes it a little harder to monitor 
but the codec2 already uses a fair share of stack in some places.
My concern was a migration to memory allocated statically which sits 
unused most of the time. This would be a true waste.
> *******************************************************************************
> Take a look at the memory management routine  heap2.c in freertos.c
>    (in fact, there are heap1,2,3,4,5 .c - a few options... try heap4, also)
> -this is a much smarter memory alloc and dealloc routine that is fairly
> cheap.
> much better than usual brain dead malloc.
> ********************************************************************************
> I'd recommend using that. It looks for blocks same size, existing used etc
>
> I would expect the same improvements on the F4 as the F7 using the CMSIS
> library. The F7 is much faster on that sort of code.
>
> I only got rid of the FFT malloc stuff the huge stack additions are
> still in there
> and you could save 50% there ...
Hope to see this soon. In order to not do double work here, we'll wait 
for your changes to materialize. The mcHF is now in a state where we can 
play with FreeDV. While this currently has some impact on the time 
available for task like the spectrum display, this is not critical since 
we can RX and TX without issues AFAIK.

Regards,
Danilo


------------------------------------------------------------------------------
_______________________________________________
Freetel-codec2 mailing list
Freetel-codec2@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freetel-codec2

Reply via email to