Browse Source

completely deprecate sgx.heap_min

Chia-Che Tsai 6 years ago
parent
commit
3a40af399d
1 changed files with 2 additions and 6 deletions
  1. 2 6
      Pal/src/host/Linux-SGX/sgx_main.c

+ 2 - 6
Pal/src/host/Linux-SGX/sgx_main.c

@@ -278,10 +278,6 @@ int initialize_enclave (struct pal_enclave * enclave)
         goto err;
     }
 
-    /* Reading sgx.heap_min from manifest */
-    if (get_config(enclave->config, "sgx.heap_min", cfgbuf, CONFIG_MAX) > 0)
-        heap_min = parse_int(cfgbuf);
-
     /* Reading sgx.thread_num from manifest */
     if (get_config(enclave->config, "sgx.thread_num", cfgbuf, CONFIG_MAX) > 0)
         enclave->thread_num = parse_int(cfgbuf);
@@ -295,9 +291,9 @@ int initialize_enclave (struct pal_enclave * enclave)
     /* Reading sgx.static_address from manifest */
     if (get_config(enclave->config, "sgx.static_address", cfgbuf, CONFIG_MAX) > 0 &&
         cfgbuf[0] == '1')
-        enclave->baseaddr = DEAFULT_HEAP_MIN;
+        enclave->baseaddr = heap_min;
     else
-        enclave->baseaddr = 0;
+        enclave->baseaddr = heap_min = 0;
 
     TRY(read_enclave_token, enclave->token, &enclave_token);
     TRY(read_enclave_sigstruct, enclave->sigfile, &enclave_sigstruct);