未验证 提交 5ce0bd84 编写于 作者: Y Yang Zhao 提交者: GitHub

[TD-10689]<improve>optimize memory using for arm platform (#8351)

* memory save for cmdline

* optimize memory using for arm platform

* remove unused var

* save random data init mem usage

* free db and stb

* add prepared_rand parameter

* free g_Dbs

* fix

* fix coredump when free

* modify free point

* fix nchar binary randomness
上级 cdb8aeba
...@@ -2508,7 +2508,7 @@ static void rand_string(char *str, int size) { ...@@ -2508,7 +2508,7 @@ static void rand_string(char *str, int size) {
//--size; //--size;
int n; int n;
for (n = 0; n < size; n++) { for (n = 0; n < size; n++) {
int key = abs(rand_tinyint()) % (int)(sizeof(charset) - 1); int key = abs(taosRandom()) % (int)(sizeof(charset) - 1);
str[n] = charset[key]; str[n] = charset[key];
} }
str[n] = 0; str[n] = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册