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

What is the maximum available memory of the enclave?

enclave_Research
Anfänger
2.996Aufrufe

What is the maximum available memory of the enclave? How much should I set the stack and heap so that the enclave can encapsulate the maximum data?

0 Kudos
1 Lösung
JesusG_Intel
Moderator
2.741Aufrufe

Hello enclave_research,


You are requesting to allocate 32 GB to each of the heap and stack and that is causing memory issues because, I suspect, you don't have that much RAM. On my system, it compiles very slowly and errors out at runtime with SGX_OUT_OF_MEMORY. Try allocating less memory so that it at least fits into your available RAM and you still have room for other processes to run.


Sincerely,

Jesus G.

Intel Customer Support


Lösung in ursprünglichem Beitrag anzeigen

7 Antworten
X99
Neuer Beitragender I
2.958Aufrufe

The best answer is "it depends". Legacy CPU supporting SGX were limited to 128 or 256Mbytes, but Intel recently increased this limit...dramatically...up to 1Tbyte. Intel's ARK CPU pages might help.

enclave_Research
Anfänger
2.953Aufrufe

When compiling enclaves, if the requested memory exceeds 64G, it will prompt that the requested memory is too large and the compilation fails.Why?

JesusG_Intel
Moderator
2.908Aufrufe

Hello enclave_research,


Ensure you have configured your project to compile as x64. If this doesn't work, send us more details including source code, makefiles, Visual Studio sln, etc, so we can reproduce your issue.


Have you tested your problematic code snippet as a separate test program outside of the enclave to ensure that it can compile?


Sincerely,

Jesus G.

Intel Customer Support


JesusG_Intel
Moderator
2.852Aufrufe

Hello enclave_research,


Do you still need help with this issue?


Sincerely,

Jesus G.

Intel Customer Support


enclave_Research
Anfänger
2.798Aufrufe

I compile example SealUnseal on the Ubuntu server,Other codes remain unchanged,but Enclave_Seal.config.xml is:

<StackMaxSize>0x7ffc00000</StackMaxSize>

    <HeapMaxSize>0x7ffc00000</HeapMaxSize>

    <TCSNum>1</TCSNum>

JesusG_Intel
Moderator
2.742Aufrufe

Hello enclave_research,


You are requesting to allocate 32 GB to each of the heap and stack and that is causing memory issues because, I suspect, you don't have that much RAM. On my system, it compiles very slowly and errors out at runtime with SGX_OUT_OF_MEMORY. Try allocating less memory so that it at least fits into your available RAM and you still have room for other processes to run.


Sincerely,

Jesus G.

Intel Customer Support


JesusG_Intel
Moderator
2.735Aufrufe

Hello enclave_research,


Refer to section Enclave Memory Measurement Tool in the SGX Linux Developer Reference Guide to learn how to use sgx-gdb and sgx_emmt to help determine how much stach and heap to allocate to your enclave based on how much memory the enclave uses.


Sincerely,

Jesus G.

Intel Customer Support


Antworten