map now alocates map memory as needed in beginning writes