returns current memory usage

@param bool 		$format
@return string
559022
public static function memory( $format = false )
	{	
		$memory = memory_get_usage() - CCF_PROFILER_MEM;
		
		if ( $format )
		{
			return CCStr::bytes( $memory );
		}
		
		return $memory;
	}
683439
public function getProgressBarFormat($format)
    {
        return $this->displayBelow(function () use (&$format) {
            $tree = $this->getTree().$this->getFork();

            $format = explode(PHP_EOL, $format);
            $format = $tree.implode(PHP_EOL.$tree.' ', $format);

            return $format;
        }, 2);
    }
839036
final public function format($format)
    {
        if(is_null($this->value)) {
            return null;
        } else {
            return $this->value->format($format);
        }
    }
1072826
public function get($format)
    {
        if ('plain' == $format || 'string' == $format) {
            return $this->makePlain();
        }
        if ('json' == $format) {
            return $this->makeJson();
        }

        return json_decode($this->response, true);
    }
1111948
protected function stashCustomFormatOptions(&$format) {
		$format = str_replace($this->formatOptionsNames, $this->formatOptionsPlaceholders, $format, $count);
		return (bool)$count;
	}
1075641
public function getTime($format = null)
    {
        //argument 1 must be a string or null
        Argument::i()->test(1, 'string', 'null');

        $time = $this->time + $this->offset;

        if (!is_null($format)) {
            return date($format, $time);
        }

        return $time;
    }
769150
public static function size($file = false, $format = 'bytes') {

        if ($file && self::isFile($file)) {

            $size = filesize($file);

            switch ($format) {
                case 'bytes':
                    return $size;
                    break;
                case 'kb':
                    return Number::round(($size / 1024), 2);
                    break;
                case 'mb':
                    return Number::round(($size / 1048576), 2);
                    break;
            }
        }

        return false;
    }
955082
public function getAmount($format = true, $withTax = false)
    {
        $total = $this->amount;

        if ($withTax) {
            $total += $this->tax * $total;
        }

        return LaraCart::formatMoney($total, $this->locale, $this->internationalFormat, $format);
    }
336957
public function getFormatClass($format = '')
    {
        if ( ! empty($format)) {
            return $this->processContentType($format);
        }

        if (isset($_SERVER['CONTENT_TYPE'])) {
            $type = $this->processContentType($_SERVER['CONTENT_TYPE']);
            if ($type !== false) {
                return $type;
            }
        }

        if (isset($_SERVER['HTTP_CONTENT_TYPE'])) {
            $type = $this->processContentType($_SERVER['HTTP_CONTENT_TYPE']);
            if ($type !== false) {
                return $type;
            }
        }

        return 'Nathanmac\Utilities\Parser\Formats\JSON';
    }
1285436
public function getBoletoExpirationDate($format = 'Y-m-d\TH:i:s')
    {
        $value = $this->getParameter('boleto_expiration_date');
        
        return $value ? $value->format($format) : null;
    }
176335
public function getMemoryPeak($raw = false, $format = null)
    {
        $memory = memory_get_peak_usage(true);
        return $raw ? $memory : self::readableSize($memory, $format);
    }
1214371
public function getErrors($format = true)
    {
        if (!$format) {
            return $this->errors;
        }

        $formatted = array();

        foreach ($this->errors as $error) {
            $formatted[] = $this->getFormattedError($error);
        }

        return $formatted;
    }
414689
public static function getMemoryUsage()
    {
        $memory = false;
        if (function_exists('xdebug_memory_usage')) {
            $memory = xdebug_memory_usage();
        } elseif (function_exists('memory_get_usage')) {
            $memory = memory_get_usage();
        }
        if ($memory === false) {
            return "Memory usage function not found.";
        }
        $usage = number_format(round($memory / 1024 / 1024, 2), 2);
        return "$usage Mb";
    }
611576
public function getLocale($format = self::UNDERSCORE)
    {
        $localization = strtolower($this->getLanguage());

        if (null != $this->getCountry()) {
            $country = strtolower($this->getCountry());
            $delimiter = '-';

            switch ($format) {
                case self::UNDERSCORE:
                    $delimiter = '_';
                    break;
                case self::ISO6391:
                    $country = strtoupper($country);
                    break;
                case self::LCID:
                    $delimiter = '_';
                    $country = strtoupper($country);
                    break;
            }

            $localization .= $delimiter . $country;
        }

        return $localization;
    }
1280240
public function getMemoryUsage()
    {
        $size = memory_get_usage(true);
        $unit = array('b','kb','mb','gb','tb','pb');
                
        return @round($size/pow(1024,($i=floor(log($size,1024)))),2).' '.$unit[$i];
    }
54488
public function getPiwikVersion($format = null)
    {
        $options = $this->getOptions($format)
            ->usePeriod(false)
            ->useSiteId(false);

        return $this->request->send($options);
    }
1285147
public function netTotal($format = true)
    {
        $total = 0;

        if ($this->count() != 0) {
            foreach ($this->getItems() as $item) {
                $total += $item->netTotal(false);
            }
        }

        if ($total < 0) {
            $total = 0;
        }

        return $this->formatMoney($total, null, null, $format);
    }