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 the global allocator, not the system allocator #947

Merged

Conversation

fitzgen
Copy link
Member

@fitzgen fitzgen commented Oct 10, 2018

This was previously causing us to accidentally always pull in the system allocator, even if users were trying to just use a custom global allocator.

This was previously causing us to accidentally always pull in the system
allocator, even if users were trying to just use a custom global allocator.
@frehberg
Copy link

frehberg commented Oct 10, 2018

In case of using different global allocator (for example wee_alloc), without this patch the functions __wbindgen_malloc etc. would still link against dlmalloc, increasing wasm-binary-footprint by around 20KB, and causing issues using two different dynamic memory allocators, internally wee_alloc and another one (dlmalloc) being used by exported functions __wbindgen_malloc, etc.

@alexcrichton alexcrichton merged commit 35eeb71 into rustwasm:master Oct 10, 2018
@fitzgen fitzgen deleted the use-global-allocator-not-system branch October 10, 2018 17:58
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.

3 participants