Added primitive memory checking boundaries to memory accessor code