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

Fix MallocCount for MinGW #2884

Merged
merged 1 commit into from
Sep 16, 2024
Merged

Conversation

mikee47
Copy link
Contributor

@mikee47 mikee47 commented Sep 16, 2024

MinGW defines aliases in stdlib.h for realloc and free which require wrapping.

Copy link

what-the-diff bot commented Sep 16, 2024

PR Summary

  • Update to include additional memory wrap functions for Windows
    The configuration file (component.mk) has been updated to encompass additional functions related to handling memory. This enhancement is specifically for the Windows operating system, adding the functions __mingw_realloc and __mingw_free to the group of wrap functions (MC_WRAP_FUNCS).

  • Adjustments to support Windows memory wrap in malloc_count.cpp
    The script file malloc_count.cpp has undergone modifications to support the new memory wrap functions introduced for Windows. This has been done by creating aliases for __mingw_realloc and __mingw_free, allowing them to act as mc_realloc and mc_free, respectively.

MinGW defines aliases in stdlib.h for `realloc` and `free` which require wrapping.
@mikee47 mikee47 force-pushed the fix/mingw-malloc-count branch from 435741c to 727baa0 Compare September 16, 2024 07:21
@slaff slaff added this to the 6.0.0 milestone Sep 16, 2024
@slaff slaff merged commit 3cb6f28 into SmingHub:develop Sep 16, 2024
46 checks passed
@mikee47 mikee47 deleted the fix/mingw-malloc-count branch September 16, 2024 10:21
@slaff slaff mentioned this pull request Dec 11, 2024
5 tasks
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