Lines Matching refs:contentStr
317 std::string contentStr; in ReadZswapdPressureShow() local
318 if (!ReadFromFile(ZWAPD_PRESSURE_SHOW_PATH, contentStr)) { in ReadZswapdPressureShow()
319 …ead %{public}s faild, content=[%{public}s]", ZWAPD_PRESSURE_SHOW_PATH.c_str(), contentStr.c_str()); in ReadZswapdPressureShow()
322 char *contentPtr = new char[contentStr.size() + 1]; in ReadZswapdPressureShow()
327 if (strcpy_s(contentPtr, contentStr.size() + 1, contentStr.c_str()) != EOK) { in ReadZswapdPressureShow()
465 std::string contentStr; in ReadSwapOutKBSinceKernelBoot() local
466 if (!ReadFromFile(path, contentStr)) { in ReadSwapOutKBSinceKernelBoot()
469 char *contentPtr = new char[contentStr.size() + 1]; in ReadSwapOutKBSinceKernelBoot()
474 if (strcpy_s(contentPtr, contentStr.size() + 1, contentStr.c_str()) != EOK) { in ReadSwapOutKBSinceKernelBoot()
517 int KernelInterface::ParseMeminfo(const std::string &contentStr, const std::string &itemName) in ParseMeminfo() argument
519 char *contentPtr = new (std::nothrow) char[contentStr.size() + 1]; in ParseMeminfo()
524 if (strcpy_s(contentPtr, contentStr.size() + 1, contentStr.c_str()) != EOK) { in ParseMeminfo()
572 std::string contentStr; in GetTotalBuffer() local
573 if (!ReadFromFile(MEMINFO_PATH, contentStr)) { in GetTotalBuffer()
574 … HILOGE("read %{public}s faild, content=[%{public}s]", MEMINFO_PATH.c_str(), contentStr.c_str()); in GetTotalBuffer()
577 totalBuffer_ = ParseMeminfo(contentStr, TOTAL_MEMORY); in GetTotalBuffer()