diff options
| author | Man, Jianting (Meco) <[email protected]> | 2023-07-21 22:36:42 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-07-22 10:36:42 +0800 |
| commit | 244b903e5def3cd4aefc4bf2ebdc4687826e2f4d (patch) | |
| tree | 8bbed859a1b5c38a449b9e2c6a35d3026eeecaef /components/mm | |
| parent | 52d3637fba5e3e4048ba036803d6292f3e7a4a70 (diff) | |
[debug] 整理debug宏并增加RT_DEBUGING_CONTEXT (#7805)
Diffstat (limited to 'components/mm')
| -rw-r--r-- | components/mm/mm_page.c | 4 | ||||
| -rw-r--r-- | components/mm/mm_page.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/components/mm/mm_page.c b/components/mm/mm_page.c index 53df6a4e28..51104fbf71 100644 --- a/components/mm/mm_page.c +++ b/components/mm/mm_page.c @@ -85,7 +85,7 @@ static struct rt_mem_obj mm_page_mapper = { .hint_free = hint_free, }; -#ifdef RT_DEBUG_PAGE_LEAK +#ifdef RT_DEBUGING_PAGE_LEAK static volatile int enable; static rt_page_t _trace_head; #define TRACE_ALLOC(pg, size) _trace_alloc(pg, __builtin_return_address(0), size) @@ -556,7 +556,7 @@ static void *_do_pages_alloc(rt_uint32_t size_bits, size_t flags) { alloc_buf = page_to_addr(p); - #ifdef RT_DEBUG_PAGE_LEAK + #ifdef RT_DEBUGING_PAGE_LEAK level = rt_hw_interrupt_disable(); TRACE_ALLOC(p, size_bits); rt_hw_interrupt_enable(level); diff --git a/components/mm/mm_page.h b/components/mm/mm_page.h index e5386640dc..99cb5a804e 100644 --- a/components/mm/mm_page.h +++ b/components/mm/mm_page.h @@ -34,7 +34,7 @@ #define PAGE_ANY_AVAILABLE 0x1ul -#ifdef RT_DEBUG_PAGE_LEAK +#ifdef RT_DEBUGING_PAGE_LEAK #define DEBUG_FIELD { \ /* trace list */ \ struct rt_page *tl_next; \ |
