Sfoglia il codice sorgente

Tweaks to enclave mem from Aaron's original commit for it

Sajin 1 anno fa
parent
commit
4db69d3679
1 ha cambiato i file con 7 aggiunte e 2 eliminazioni
  1. 7 2
      gen_enclave_config.py

+ 7 - 2
gen_enclave_config.py

@@ -33,6 +33,7 @@ def generate_config(N, M, T, B, PRIVATE_ROUTE=True, PRO=1, PRI=1, PUO=1, PUI=1,
     # Base heap of 2 MB per thread
     heap_size = 2000000 * T
 
+    num_buffers = 5
     num_out_mult = PRO
     if(not(PRIVATE_ROUTE)):
         num_out_mult = PUO
@@ -40,8 +41,12 @@ def generate_config(N, M, T, B, PRIVATE_ROUTE=True, PRO=1, PRI=1, PUO=1, PUI=1,
     # Storage and Ingestion data stored per_client = 52 bytes
     heap_size += clients_per_server * (B + 60)
 
-    # 4 Buffers of clients_per_server items of B size each
-    heap_size += (clients_per_server * B * 5) * num_out_mult
+    # 5 Buffers of clients_per_server items of B size each for
+    # private routing
+    heap_size += (clients_per_server * B * num_buffers) * num_out_mult
+    # Additional buffers for public routing
+    if(not(PRIVATE_ROUTE)):
+        heap_size += (clients_per_server * B * 3) + ((M-1)**2 * B * 4)
 
     # num_WN_to_precompute times size of each WN
     heap_size += (num_WN_to_precompute * num_out_mult * \