mem: add thread unsafe version for DMA mask check