pub fn setup_memory_limit() -> Result<()>
Initialize the memory thread to monitor memory usage/limits