How to adjust enclave configurations to pass large arrays to an enclave.
- Attempted to pass a very large array to an enclave via an ecall.
- Received error: Segmentation fault (core dumped)
- Decreased size of array and was able to successfully pass it to the enclave.
There is not enough memory allocated to the enclave to pass a large array.
In the Enclave Configuration File, enclave.config.xml, increase the amount of heap memory allocated to the enclave:
- Increase HeapInitSize
- In a platform with SGX 2, adjust HeapMinSize and HeapMaxSize
- Reduce TCSNUM, if possible since more threads will require more memory.
Use the Enclave Memory Measurement Tool to measure the memory of your enclave so you can set Heap size accordingly. More threads will require more memory.
Refer to the Intel® SGX Developer Reference Guide for your OS for more information on setting the parameters in the Enclave Configuration File.
- The latest Intel® SGX Developer Reference for Linux* is in Intel® SGX Linux* Latest Docs
- The Intel Intel® SGX Developer Reference for Windows* is distributed with the Intel® SGX SDK for Windows* installation package.