[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] mem.h - using custom mem_init
From: |
Rasmussen, Art N. |
Subject: |
[lwip-users] mem.h - using custom mem_init |
Date: |
Mon, 10 Dec 2007 12:52:23 -0600 |
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.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lwip-users] mem.h - using custom mem_init,
Rasmussen, Art N. <=