Intel® Software Guard Extensions (Intel® SGX)
Discussion board focused on hardware-based isolation and memory encryption to provide extended code protection in solutions.

HeapMaxSize limitation using linux

Xiaohe_H_
Beginner
658 Views

Hi,

 

I know there were some threads discussing the EPC or heap size. My question is different. Given the previous discussion, SGX dirver in linux platform supports swapping, so that enclave size can exceed the EPC size (~90MB). But I found if the HeapMaxSize set to a large number, enclave can not be created yet.

I run the test on a linux server with 64GB RAM. When I set HeapMaxSize to 0x800000000 (around 34GB), the sgx_create_enclave API returns errno 3, i.e. out of memory. HeapMaxSize set to 0x700000000 works. 

My question is what is the reason of HeapMaxSize limitation (roughly enclave memory limitation)? It seems enclave can not consume all the physical RAM at least.

Thanks!

Xiaohe

0 Kudos
1 Reply
Shivananda_H_Intel
658 Views

Hi Xiaohe

The out of Memory error could be due to inability to find the linear size of 34GB . Can you check the memory available before running the application ?

Regards,

Shivananda

 

0 Kudos
Reply