Commit cc0ff7e9 by Fear1ess

4/8

parent d30f8220
...@@ -433,7 +433,7 @@ void collect_mem_info(JNIEnv *env, cJSON *json) { ...@@ -433,7 +433,7 @@ void collect_mem_info(JNIEnv *env, cJSON *json) {
u_long ram_total = si.totalram * si.mem_unit; u_long ram_total = si.totalram * si.mem_unit;
u_long ram_free = si.freeram * si.mem_unit; u_long ram_free = si.freeram * si.mem_unit;
char ram_buf[32] = {0}; char ram_buf[32] = {0};
snprintf(ram_buf, 31, "lu, %lu", ram_total, ram_free); snprintf(ram_buf, 31, "%lu, %lu", ram_total, ram_free);
cJSON_AddStringToObject(item, "ram", ram_buf); cJSON_AddStringToObject(item, "ram", ram_buf);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment