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

In libqhull_r, if qh_malloc and qh_free are to be useful, qh_calloc is also needed #121

Open
davidheff opened this issue Sep 7, 2022 · 3 comments

Comments

@davidheff
Copy link

usermem_r.c implements qh_malloc and qh_free which are used instead of calls to malloc and free. However, the library also includes three calls to calloc, and there is no corresponding qh_calloc.

In order for qh_malloc and qh_free to be useful, the user might want to replace use of standard malloc and free with functions from another library. For that to be useful, all memory allocation needs to be user customisable. So there really needs to be a qh_calloc, and the three calls to calloc to be replaced by calls to qh_calloc also.

@davidheff
Copy link
Author

Of course, another way is to replace the three calls to calloc with malloc + memset

@cbbarber
Copy link
Collaborator

Good suggestion. It will be fixed in the next release (2023.1)

@davidheff
Copy link
Author

Thanks

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

No branches or pull requests

2 participants