service_vm_manager: Reduce VM_MEMORY_MB to 8 MiB
Rialto only maps its code region (up to 2 MiB), data scratch region (up
to 2 MiB), and VMM-provided device tree region (up to 2 MiB). Depending
on the alignment, 2 MiB might end up padding between 2 of those regions.
Therefore, reduce the virtual memory size to 8 MiB as a higher value
serves no purpose and this will allow us to catch unexpected memory
usage from the Service VM, giving us more confidence in the claim that
the Service VM's memory consumption is actually low.
Test: atest rialto_test
Change-Id: I1c2045b98ce97af6d57cbba0b81c6422bbd8beb9
diff --git a/libs/libservice_vm_manager/src/lib.rs b/libs/libservice_vm_manager/src/lib.rs
index a93a399..8564c51 100644
--- a/libs/libservice_vm_manager/src/lib.rs
+++ b/libs/libservice_vm_manager/src/lib.rs
@@ -38,7 +38,7 @@
use vsock::{VsockListener, VsockStream, VMADDR_CID_HOST};
/// Size of virtual memory allocated to the Service VM.
-pub const VM_MEMORY_MB: i32 = 300;
+pub const VM_MEMORY_MB: i32 = 8;
const VIRT_DATA_DIR: &str = "/data/misc/apexdata/com.android.virt";
const RIALTO_PATH: &str = "/apex/com.android.virt/etc/rialto.bin";