I assume, you are referring to the SGX Memory available for use after the device bootup and SGX is enabled in BIOS.
You can check/print it in isgx_page_cache_init(.. ) the size param, which will be the EPC Size available for SGX Use.
To get it though sgx_page_cache_init() , we should have SDK installed.
What if SDK is not installed and we need to check SGX memory?
Is there a way that, I can get it from CPUID instruction? , The way we are getting SGX enabled or not from CPUID instruction by passing 07H in EAX register.
CPUID leaf 12H sub-leaves 2 and higher report physical memory resources available for use with Intel SGX. These physical memory sections are typically configured by BIOS as Processor Reserved Memory, and available to the OS to manage as EPC.
Pls refer to below programming guide for more info . Page 17