share memory with arma vector