diff options
| author | [email protected] <[email protected]> | 2011-07-04 23:48:07 +0000 |
|---|---|---|
| committer | [email protected] <[email protected]> | 2011-07-04 23:48:07 +0000 |
| commit | cea21370a40d8b9ace858c477d5cedf214cdf520 (patch) | |
| tree | 8144ca112fbc77be725326182d0dcb3d530c55f3 /include | |
| parent | 3bc0dd4a825f80a0e56d8a92e633a06435f1ac40 (diff) | |
rewrite module memory allocator
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1618 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'include')
| -rw-r--r-- | include/rtdef.h | 4 | ||||
| -rw-r--r-- | include/rtthread.h | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/include/rtdef.h b/include/rtdef.h index e1dddcdcc2..2b60914e46 100644 --- a/include/rtdef.h +++ b/include/rtdef.h @@ -759,8 +759,8 @@ struct rt_module /* module memory allocator */ void* mem_list; /**< module's free memory list */ - rt_list_t page_list; /**< module's using page list */ - rt_mp_t mpool; /**< module's memory pool */ + void* page_array; /**< module's using pages */ + rt_uint32_t page_cnt; /**< module's using pages count */ rt_uint32_t nsym; /**< number of symbol in the module */ struct rt_module_symtab *symtab; /**< module symbol table */ diff --git a/include/rtthread.h b/include/rtthread.h index c3bc0516b5..27c6c97b7d 100644 --- a/include/rtthread.h +++ b/include/rtthread.h @@ -317,6 +317,12 @@ void rt_module_free(rt_module_t module, void *addr); rt_module_t rt_module_self (void); rt_err_t rt_module_set (rt_module_t module); rt_module_t rt_module_find(const char* name); + +#ifdef RT_USING_HOOK +void rt_module_load_sethook(void (*hook)(rt_module_t module)); +void rt_module_unload_sethook(void (*hook)(rt_module_t module)); +#endif + #endif /*@}*/ |
