[kernel] Add hook for malloc services

Including the patch for memory allocation, testsuites and fixups of
static analysis.

Signed-off-by: Shell <smokewood@qq.com>
This commit is contained in:
Shell
2023-12-22 15:44:45 +08:00
committed by Meco Man
parent 7c07a97479
commit 3a7903b799
11 changed files with 149 additions and 63 deletions

View File

@@ -53,7 +53,7 @@ int msh_help(int argc, char **argv)
return 0;
}
MSH_CMD_EXPORT_ALIAS(msh_help, help, RT-Thread shell help.);
MSH_CMD_EXPORT_ALIAS(msh_help, help, RT-Thread shell help);
#ifdef MSH_USING_BUILT_IN_COMMANDS
int cmd_ps(int argc, char **argv)
@@ -69,7 +69,7 @@ int cmd_ps(int argc, char **argv)
list_thread();
return 0;
}
MSH_CMD_EXPORT_ALIAS(cmd_ps, ps, List threads in the system.);
MSH_CMD_EXPORT_ALIAS(cmd_ps, ps, List threads in the system);
#ifdef RT_USING_HEAP
int cmd_free(int argc, char **argv)
@@ -88,7 +88,7 @@ int cmd_free(int argc, char **argv)
#endif
return 0;
}
MSH_CMD_EXPORT_ALIAS(cmd_free, free, Show the memory usage in the system.);
MSH_CMD_EXPORT_ALIAS(cmd_free, free, Show the memory usage in the system);
#endif /* RT_USING_HEAP */
#endif /* MSH_USING_BUILT_IN_COMMANDS */
@@ -296,8 +296,7 @@ static int _msh_exec_cmd(char *cmd, rt_size_t length, int *retp)
}
#if defined(RT_USING_SMART) && defined(DFS_USING_POSIX)
pid_t exec(char*, int, int, char**);
#include <lwp.h>
/* check whether a file of the given path exits */
static rt_bool_t _msh_lwp_cmd_exists(const char *path)
{