private function getMemory()
    {
        $memory = shmop_open($this->key, "c", 0644, self::LIMIT);

        if (!$memory) {
            throw new Exception("Unable to open the shared memory block");
        }

        return $memory;
    }