[En-Nut-Discussion] Duplicate code in httpd.c and ssi.c
Harald Kipp
harald.kipp at egnite.de
Sun Jul 27 16:10:57 CEST 2008
Thiago A. Corrêa wrote:
> But, either way, it's best practice to match
> NutHeapAlloc with NutHeapFree and malloc with free instead of mixing
> them up.
I agree with that one and like to add another thought. If I remember
correctly, I tried to replace NutHeapAlloc/Free by malloc/free some time
ago, but had to revert this change because of link sequence problems.
Since Nut/OS uses -Wl,--start-group and -Wl,--end-group, link sequence
problems are gone and it may be save now to use malloc/free in the
application layer network code. This will make it a bit easier to port
this code to other operating systems.
Harald
More information about the En-Nut-Discussion
mailing list