return factor*amount;
return amount;
    private static int parseMemoryTreshold(String value) {        if (value == null) {            value = "1M";        }        value = value.toLowerCase();        int factor = 1;        if (value.endsWith("m")) {            value = value.substring(0, value.length() - 1);            factor = 1048576;        } else if (value.endsWith("mb")) {            value = value.substring(0, value.length() - 2);            factor = 1048576;        } else if (value.endsWith("k")) {            value = value.substring(0, value.length() - 1);            factor = 1024;        } else if (value.endsWith("kb")) {            value = value.substring(0, value.length() - 2);            factor = 1024;        }        try {            int amount = Integer.parseInt(value);            if (amount < SEGMENT_ENTRY_SIZE) {                amount = SEGMENT_ENTRY_SIZE;            }            return factor*amount;        } catch (NumberFormatException e) {            return parseMemoryTreshold(null);        }            }