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.compact does implies Gc.full_major #5177

Closed
vicuna opened this issue Nov 10, 2010 · 0 comments
Closed

Gc.compact does implies Gc.full_major #5177

vicuna opened this issue Nov 10, 2010 · 0 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Nov 10, 2010

Original bug ID: 5177
Reporter: @alainfrisch
Status: closed (set by @damiendoligez on 2010-11-10T15:47:41Z)
Resolution: fixed
Priority: normal
Severity: minor
Fixed in version: 3.12.1+dev
Category: ~DO NOT USE (was: OCaml general)

Bug description

The doc for Gc.compact says: "Perform a full major collection and compact the heap."

However, reading the implementation in byterun/gc_ctrl.c, one can see that compact does not do the same set of operations as full_major:

full_major:
caml_empty_minor_heap ();
caml_finish_major_cycle ();
caml_final_do_calls ();
caml_empty_minor_heap ();
caml_finish_major_cycle ();

compact:
caml_empty_minor_heap ();
caml_finish_major_cycle ();
caml_finish_major_cycle ();

I believe it would be a good idea to do the extra final_do_calls/empty_minor_heap in compact as well.

@vicuna vicuna closed this as completed Nov 10, 2010
@vicuna vicuna added the bug label Mar 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant