Hi! I am trying to allocate 1.8MB memory on the heap, with malloc, inside the enclave, then make an OCALL where I pass as parameter a [in, out] pointer(*message_in) to this allocated memory(size_t message_len = 1823577):
However, I get stack overflow on ocall_get_next_message:
I believe I have allocated enough memory on the stack:
Moreover, trying to increase the stack size(even only to 0x3600000) or the heap size more (still multiple of 4k) makes the program not start anymore:
I wanted to ask where could be the problem and what are the limitations of an enclave, besides the 128MB size. How much memory can pass a pointer to in an OCALL/ECALL and what is the maximum size my stack and heap can have? I could not find information about this in the developer guide.