- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear All,
What is the maximum size of a buffer that we can allocate inside the enclave?
I mean if I am defining a function in my enclave.edl as follows
public void buffer_block_access([out, size=block_length]char*buffer, size_t block_length);
what is the maximum of "block_length" that I can define?
I malloc a buffer with the size of 2MB in my code like this
const size_t SZ = 2097152; char *buff = (char *)malloc(SZ*sizeof(char));
and when I call the function as mentioned bellow
sgx_status_t stat = buffer_block_access(global_eid, buff, SZ);
It returns back
stat = 3
- Tags:
- General Support
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It will depends on two factors:
1. Your system's EPC size: you can modify and configure your EPC size in your system's BIOS
2. your enclave's configuration file(enclavename.config.xml): this is one typical enclave configuration file:
<EnclaveConfiguration>
<ProdID>0</ProdID>
<ISVSVN>0</ISVSVN>
<StackMaxSize>0x40000</StackMaxSize>
<HeapMaxSize>0x100000</HeapMaxSize>
<TCSNum>1</TCSNum>
<TCSPolicy>1</TCSPolicy>
<DisableDebug>0</DisableDebug>
<MiscSelect>0</MiscSelect>
<MiscMask>0xFFFFFFFF</MiscMask>
</EnclaveConfiguration>
Please pay attention to the high-light part.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page