Skip to content

Catch calls to initialize an oversize heap#78

Open
satur9nine wants to merge 1 commit into
rhempel:mainfrom
satur9nine:catch_oversize_heap
Open

Catch calls to initialize an oversize heap#78
satur9nine wants to merge 1 commit into
rhempel:mainfrom
satur9nine:catch_oversize_heap

Conversation

@satur9nine

Copy link
Copy Markdown

Suggested fix for #77

@rhempel

rhempel commented Nov 30, 2025

Copy link
Copy Markdown
Owner

Hey thanks for submitting this PR, I am in the middle of a business trip, but should be back to integrate this next week.

I'm also working on improving the docs a bit so that it fits into my adaptabuild system so it's a good time to go over this module.

Do you mind if I ask where you are using this library? I gave a presentation on a separate topic a while back and out of about 30 attendees, two were using the library :-)

@satur9nine

satur9nine commented Nov 30, 2025 via email

Copy link
Copy Markdown
Author

@rhempel

rhempel commented Jun 24, 2026

Copy link
Copy Markdown
Owner

I have implemented the check for oversized heap, but we need to still decide how to handle it when it happens.

My personal vote is either calling a user-defined failure function (preferred) or hanging (less preferred) or segfaulting (last resort)

@satur9nine

Copy link
Copy Markdown
Author

I have implemented the check for oversized heap, but we need to still decide how to handle it when it happens.

My personal vote is either calling a user-defined failure function (preferred) or hanging (less preferred) or segfaulting (last resort)

You mentioned an idea in #77

We could consider having the init_xxx() APIs return true/false which would break existing code, or we can add an API for check_init_xxx() tjhat returns true/false .

I think new check_init_ functions that return int would be ideal (int that returns 0 on success is a bit more C standard).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants