memory.c doc: add a note on the 'mixed' memory non-model#12473
Merged
gasche merged 1 commit intoocaml:trunkfrom Aug 6, 2023
Merged
memory.c doc: add a note on the 'mixed' memory non-model#12473gasche merged 1 commit intoocaml:trunkfrom
gasche merged 1 commit intoocaml:trunkfrom
Conversation
xavierleroy
approved these changes
Aug 6, 2023
Contributor
xavierleroy
left a comment
There was a problem hiding this comment.
I'm not sure why I was summoned, but I find this documentation useful, esp. the link to "the Linux memory model", which I hadn't read before. We can always argue what's the best place for such documentation: personally, I believe that comments in an implementation file (.c file) should explain the implementation, not the interface nor the high-level design as in the case here. But there is precedent (the [MM] comment in this file), and it's better than nothing, and it can be changed later if someone bothers to collect all these memory model comments in one place.
Co-authored-by: Guillaume Munch-Maccagnoni <Guillaume.Munch-Maccagnoni@inria.fr> Reported-by: Olivier Nicole <olivier@chnik.fr>
2104e08 to
33a0b7d
Compare
Member
Author
Thanks! |
Contributor
|
Thanks @gasche |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR takes a description of our current understanding of how to write C code for the OCaml runtime, written jointly with @gadmm in #10992 (comment) , and includes it as a comment in memory.c, as suggested by @OlivierNicole. The purpose is to store our collective knowledge about this tricky issue in a place that is more likely to be found in the future than a comment in an github issue.
(cc also @xavierleroy, @kayceesrk, @jhjourdan who may have opinions about this)
The original message contains a description of "future work" to improve the situation / our current understanding, which I find interesting but did not include in the documentation comment.
How to review?
Please let me know if:
If neither (1) or (2) hold, then you may want to approve :-)