Custom code to support Alf memory model.