Greetings,

The mem.h file contains basically

#if MEM_LIBC_MALLOC

#define mem_init()

#ifndef mem_free
#define mem-free(x) free(x)
#endif
...etc for the other malloc functions...
#else
...

I am using alternative malloc functions that are locally provided, not part of 
the lwIP code base. 

I would like to override the mem_init call (in core/init.c) with a call to my 
own function 'my_mem_init'.

I can override the other memory functions that mem.h manages, but not mem_init.

I'd like to suggest changing mem.h to read:

#if MEM_LIBC_MALLOC

#ifndef mem_init
#define mem_init()
#endif

#ifndef mem_free
#define mem-free(x) free(x)
#endif
...etc for the other malloc functions...
#else
...


This would allow overriding mem_init in the same manner as mem_free, etc.

I am currently calling my mem init explicitly as a separate step as a 
work-around. It would be more convenient to piggyback on the call in init.c and 
would be a cleaner implementation.

Thanks,
Art R.
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to