use_palloc must be done in both xor and non-xor map