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

Use C++ memory allocation #259

Open
paulo-vra opened this issue Dec 5, 2024 · 0 comments
Open

Use C++ memory allocation #259

paulo-vra opened this issue Dec 5, 2024 · 0 comments

Comments

@paulo-vra
Copy link

Is your feature request related to a problem? Please describe.
I am trying to modify the code to support arbitrary precision by using a class in the definition of number_t instead of the basic C types. However, the class is not initialized when structures are allocated with malloc, calloc and realloc, resulting in crashes.

Describe the solution you'd like
Replace C memory allocation with C++ allocation, using new, delete and some STL containers.

Describe alternatives you've considered
Simply replacing malloc with new and free with delete doesn't work, some complex parts of the code (sffe.cpp) use realloc, and I couldn't replace it with std::vector.

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

1 participant