Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange Out of memory when using Bigarray #7670

Closed
vicuna opened this issue Nov 13, 2017 · 5 comments
Closed

Strange Out of memory when using Bigarray #7670

vicuna opened this issue Nov 13, 2017 · 5 comments

Comments

@vicuna
Copy link

vicuna commented Nov 13, 2017

Original bug ID: 7670
Reporter: @sbriais
Assigned to: @alainfrisch
Status: resolved (set by @alainfrisch on 2017-11-13T14:02:24Z)
Resolution: duplicate
Priority: normal
Severity: minor
Platform: Windows 32 bits
Category: runtime system and C interface
Duplicate of: #7100

Bug description

I made a small reproduction case.

It allocates indefinitely a vector of floats of size 10000 (and throw the array immediately).

On trunk (c5fe693), I get an Out of memory.
I use Ocaml on Windows 32 bits, compiled with MSVC.

Here is the source code:

let main () =
while true do
ignore Bigarray.(Array1.create float64 c_layout 10000)
done

@vicuna
Copy link
Author

vicuna commented Nov 13, 2017

Comment author: @yallop

This appears to be the same issue as PR7100.

@vicuna
Copy link
Author

vicuna commented Nov 13, 2017

Comment author: @alainfrisch

Observation: all bigarray descriptors are allocated in the minor heap and the major GC does not trigger before we reach the OOM.

@vicuna
Copy link
Author

vicuna commented Nov 13, 2017

Comment author: @alainfrisch

Reducing to CAML_BA_MAX_MEMORY = 256 Mb instead of 1 Gb does not fix the problem.

@vicuna
Copy link
Author

vicuna commented Nov 13, 2017

Comment author: @sbriais

Note: It works if we set minor_heap_size to a small value.

@vicuna
Copy link
Author

vicuna commented Nov 13, 2017

Comment author: @alainfrisch

Thanks Jeremy. Will continue discussion on 7100.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants