public function useHighMemory($mem = null) {
        $ini = Zend_Registry::get('config');
        if (empty($ini->app->highMemory)) {
            return;
        }
        $highMemory = $ini->app->highMemory;
        $currentMemoryLimit = $this->getCurrentMemoryLimit();
        if (!empty($currentMemoryLimit)) {
            $megs = (int)substr($currentMemoryLimit, 0, -1);
            if ($megs < $highMemory) {
                ini_set('memory_limit', $highMemory . 'M');
            }
        } else {
            ini_set('memory_limit', $highMemory . 'M');
        }
    }