From 6db90b15afc65acb82983fcb4e7fbcd904cfd282 Mon Sep 17 00:00:00 2001 From: "bernard.xiong" Date: Sun, 6 Dec 2009 23:50:17 +0000 Subject: fix the cortex-m3 context switch bug when interrupt preempts pendsv exception; add RT_LWIP_ETH_PAD_SIZE option; fix device activate flag set issue in init function. git-svn-id: https://rt-thread.googlecode.com/svn/trunk@193 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- src/mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mem.c') diff --git a/src/mem.c b/src/mem.c index d403e5a45a..e0b351e4ac 100644 --- a/src/mem.c +++ b/src/mem.c @@ -318,7 +318,7 @@ void *rt_malloc(rt_size_t size) #ifdef RT_USING_HOOK if (rt_malloc_hook != RT_NULL) - rt_malloc_hook((rt_uint8_t*)mem, size); + rt_malloc_hook((rt_uint8_t *)mem + SIZEOF_STRUCT_MEM, size); #endif /* return the memory data except mem struct */ return (rt_uint8_t *)mem + SIZEOF_STRUCT_MEM; -- cgit v1.3.1