Navigation Menu

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

GC not working hard enough on bigarrays #7495

Closed
vicuna opened this issue Feb 24, 2017 · 4 comments
Closed

GC not working hard enough on bigarrays #7495

vicuna opened this issue Feb 24, 2017 · 4 comments
Assignees

Comments

@vicuna
Copy link

vicuna commented Feb 24, 2017

Original bug ID: 7495
Reporter: @mmottl
Assigned to: @damiendoligez
Status: acknowledged (set by @mshinwell on 2017-03-07T12:33:34Z)
Resolution: open
Priority: normal
Severity: minor
Version: 4.04.0
Category: runtime system and C interface
Monitored by: @mshinwell @mmottl

Bug description

Consider the following code:

let () =
  let open Bigarray in
  for _i = 1 to 100_000 do
    let vec = Array1.create float64 c_layout 1_000_000 in
    (* Makes sure that physical memory is actually allocated *)
    Array1.fill vec 0.
  done

This code will let memory consumption quickly go into the GB range. A comparable implementation using float arrays will stay stable in the low MB range:

let () =
  for _i = 1 to 100_000 do
    ignore (Array.make 1_000_000 0.)
  done

I remember that this is a long-standing problem, probably the same as #4616, and likely affects custom block allocation in general. Not sure whether it's already tracked in another still active issue. Since the GC will likely undergo significant changes in the near future due to attempts to parallelize it, I think this issue should remain on people's mind. Some practical numerical code can run into problems with this limitation.

@vicuna
Copy link
Author

vicuna commented Feb 25, 2017

Comment author: @dra27

Is this the same issue as #4616, as suggested (which was yours)? It looks so to me...

@github-actions
Copy link

github-actions bot commented May 9, 2020

This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.

@github-actions github-actions bot added the Stale label May 9, 2020
@xavierleroy
Copy link
Contributor

Cannot reproduce with 4.09 (didn't check anything older). Was probably fixed as part of #1738.

@mmottl
Copy link
Contributor

mmottl commented May 9, 2020

Yes, I'd expect that #1738 fixed this.

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

4 participants