=regex library strange mem allocation behaviour