added check to rw_memory. checks word alignment