Hello,
The attached patch fixes a trivial mistake in the calculation of shmem TOC. The original code allocates unduly large memory because it adds the result of add_size() to its left argument.
RegardsTakayuki Tsunakawa