* @brief This function will do the generic system heap initialization. * * @param begin_addr the beginning address of system page. * * @param end_addr the end address of system page. */
| 819 | * @param end_addr the end address of system page. |
| 820 | */ |
| 821 | void rt_system_heap_init_generic(void *begin_addr, void *end_addr) |
| 822 | { |
| 823 | rt_uintptr_t begin_align = RT_ALIGN((rt_uintptr_t)begin_addr, RT_ALIGN_SIZE); |
| 824 | rt_uintptr_t end_align = RT_ALIGN_DOWN((rt_uintptr_t)end_addr, RT_ALIGN_SIZE); |
| 825 | |
| 826 | RT_ASSERT(end_align > begin_align); |
| 827 | |
| 828 | /* Initialize system memory heap */ |
| 829 | _MEM_INIT("heap", (void *)begin_align, end_align - begin_align); |
| 830 | /* Initialize multi thread contention lock */ |
| 831 | _heap_lock_init(); |
| 832 | } |
| 833 | |
| 834 | /** |
| 835 | * @brief This function will init system heap. User can override this API to |
no test coverage detected