masks: better prevention of memory fragmentation