rta: new method `allocate_mtype` to factorize some code