public function format($memory, $params = null, $locale = null) {
		if ($memory == 0) {
			return 0;
		}

		if ($memory < 1024) {
			return round($memory) . 'b';
		}

		if ($memory < 1048576) {
			return round($memory / 1024, 2) . 'K';
		}

		if ($memory < 10485760) {
			return round($memory / 1024, 1) . 'K';
		}

		if ($memory < 104857600) {
			return round($memory / 1048576, 2) . 'M';
		}

		if ($memory < 1073741824) {
			return round($memory / 1048576, 1) . 'M';
		}

		if ($memory < 10737418240) {
			return round($memory / 1073741824, 2) . 'G';
		}
		
		return round($memory / 1073741824, 1) . 'G';
	}