Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Memory cannot be released after calling Bigarray.Genarray.change_layout. #7505
Original bug ID: 7505
If Bigarray.Genarray.change_layout is called upon a variable, the memory allocated for this variable will never be collected by GC. This increases the memory consumption significantly in some numerical applications.
Steps to reproduce
I tested on OSX, OCaml 4.04. Test 1 is totally fine, consumes about 30MB. Test 2 is bad, memory consumption exploded (over 30GB), simply because I added change_layout function.