+ memcg_conf->threshold[lvl].threshold = get_threshold_size(percent, size, value);
+ if (memcg_conf->threshold[lvl].threshold < 0)
+ return RESOURCED_ERROR_FAIL;
+
+ return RESOURCED_ERROR_NONE;
+}
+
+int memcg_set_conf_threshold_leave(bool percent, char size, const char *value)
+{
+ memcg_conf->threshold_leave.percent = percent;
+ memcg_conf->threshold_leave.threshold = get_threshold_size(percent, size, value);
+ if (memcg_conf->threshold_leave.threshold < 0)
+ return RESOURCED_ERROR_FAIL;
+