  
  #ifdef SE_SIM
  #include "t_instructions.h"    /* for `g_global_data_sim' */
-@@ -318,6 +320,27 @@
+@@ -318,6 +320,31 @@
      return 0;
  }
  
 +void sgx_memory_layout(struct SgxMemoryLayout *memory_layout) {
 +  get_memory_layout(memory_layout);
++}
++
++int sgx_get_active_enclave_entries() {
++  return get_ecall_count();
 +}
 +
 +sgx_status_t egetkey_status_to_sgx_status(int egetkey_status) {

 
 #ifdef __cplusplus
 extern "C" {
@@ -44,6 +45,7 @@
 void * get_heap_base(void);
 size_t get_heap_size(void);
 size_t get_heap_min_size(void);
+void get_memory_layout(struct SgxMemoryLayout *memory_layout);
 int * get_errno_addr(void);
 bool is_stack_addr(void *address, size_t size);
 bool is_valid_sp(uintptr_t sp);

 
 #ifdef __cplusplus
 extern "C" {
@@ -82,6 +83,53 @@
 */
 sgx_status_t SGXAPI sgx_read_rand(unsigned char *rand, size_t length_in_bytes);
 
