diff options
| author | [email protected] <[email protected]> | 2010-12-22 23:57:44 +0000 |
|---|---|---|
| committer | [email protected] <[email protected]> | 2010-12-22 23:57:44 +0000 |
| commit | c260b4d77fce75937738bf12e9ffa1c78e9dff4e (patch) | |
| tree | 4313fb76313e9cd6513feb68405ccc861166641e /components/rtgui/common/rtgui_system.c | |
| parent | ecb7e7d987e323837578516e0e0a14ba94000982 (diff) | |
update notebook control.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1223 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'components/rtgui/common/rtgui_system.c')
| -rw-r--r-- | components/rtgui/common/rtgui_system.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/components/rtgui/common/rtgui_system.c b/components/rtgui/common/rtgui_system.c index 15843c51aa..4d5fe601b5 100644 --- a/components/rtgui/common/rtgui_system.c +++ b/components/rtgui/common/rtgui_system.c @@ -736,6 +736,24 @@ void* rtgui_malloc(rt_size_t size) return ptr; } +void* rtgui_realloc(void* ptr, rt_size_t size) +{ + void* new_ptr; + +#ifdef RTGUI_MEM_TRACE + new_ptr = rtgui_malloc(size); + if ((new_ptr != RT_NULL) && (ptr != RT_NULL)) + { + rt_memcpy(new_ptr, ptr, size); + rtgui_free(ptr); + } +#else + new_ptr = rt_realloc(ptr, size); +#endif + + return new_ptr; +} + void rtgui_free(void* ptr) { #ifdef RTGUI_MEM_TRACE |
