-
Notifications
You must be signed in to change notification settings - Fork 161
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
libgap API: How much (if any) of GASMAN to expose? #3030
Comments
I have no problem with exposing |
Okay, fine by me! It would be good to have |
Yeah, |
BTW, of course we are aware that many more APIs are needed (indeed, for the various GAP-to-X interfaces I've been working on, I'd need more). But instead of blindly adding random APIs based on guesses whether somebody might or might not need them, we prefer to add them based on request resp. actual use, to make sure the APIs we add are usable and useful in practice, and not just in theory. Among the things I expect people will want are:
Finally, as we indicated before, anything that is added now can probably be backported to the 4.10 series, so it would appear in 4.10.1 or 4.10.2 etc. |
Yes, definitely. A "YAGNI" approach would be good here (which is why I was hesitant about requesting anything related to garbage collection at all).
It might still prove useful even in a revised error-handling situation. Consumers of the API will want to check whether an error occurred, and possibly manually call some "ClearError" to indicate that the error has been handled somehow, and execution of the GAP kernel may proceed normally. Otherwise, one might call further GAP functions with an already set error condition, which might cause undefined or undesired behavior. Also, per my comments in #2487 I could try to work on the error-handling situation, as I have a pretty good handle on the situation now, I think... |
anticipation that they will be added to the libgap API. See gap-system/gap#3030 Refs #2
…ystem#3030 these are probably the minimal interfaces that need to be exposed, and are compatible with all current GC implementations. As suggested at gap-system#3030 (comment) GAP_CollectBags only takes a <full> argument, but not <size>
Add libgap interfaces to the garbage collector. As discussed in #3030 these are probably the minimal interfaces that need to be exposed, and are compatible with all current GC implementations. As suggested at #3030 (comment) GAP_CollectBags only takes a <full> argument, but not <size>
With PR #4215 merged, can this be closed? If not, what do you think is missing from the GASMAN / GC interface? |
Thanks, I missed that this was merged. |
Currently none of the garbage collection related functions are (intentionally) exposed in libgap-api.h. At the very least least the
markBagsCallback
that currently gets passed toGAP_Initialize
needs to be able to callMarkBag
on objects being tracked by the user.If you didn't want to expose GASMAN internals at all (e.g. maybe for working with GAP built to use a different GC?) an alternative might be to change the
markBagsCallback
to simply return a pointer to an array of Bags (or some more opaque object pointer type) that the user wishes to be marked as active by the GC. So instead of the current implementation ofsomething roughly more like
just a thought, in case you would prefer to keep GC-related details more private.
The text was updated successfully, but these errors were encountered: