Skip to content

Rename no_prefix feature to unperfixed_malloc_on_supported_platforms#56

Merged
gnzlbg merged 6 commits intognzlbg:masterfrom
SimonSapin:override_malloc_on_supported_platforms
Jun 25, 2018
Merged

Rename no_prefix feature to unperfixed_malloc_on_supported_platforms#56
gnzlbg merged 6 commits intognzlbg:masterfrom
SimonSapin:override_malloc_on_supported_platforms

Conversation

@SimonSapin
Copy link
Copy Markdown
Contributor

As proposed in discussion starting at https://github.com/alexcrichton/jemallocator/pull/54#issuecomment-399782432.

This describes what the feature does, including its possibly-unexpected platform-specific aspect.

Avoiding negation in the name also helps argue that this feature is “correct” insofar as Cargo feature flags adding functionality and not removing them, since Cargo selects the union of features requested by multiple dependents.

@SimonSapin
Copy link
Copy Markdown
Contributor Author

“Override malloc” is meant as implying “Override malloc and other related standard symbols such as free, etc.”

@sfackler
Copy link
Copy Markdown
Collaborator

We might want to have this controlled by the same feature?

--disable-zone-allocator

Disable zone allocator for Darwin. This means jemalloc won't be hooked as the default allocator on OSX/iOS.

@SimonSapin
Copy link
Copy Markdown
Contributor Author

I don’t know what the zone allocator is. Maybe @glandium can say more on this?

@sfackler
Copy link
Copy Markdown
Collaborator

The zone allocator is how jemalloc takes over malloc/free on OSX. Rather than replacing the symbols themselves, it pokes at some other state during initialization.

@SimonSapin
Copy link
Copy Markdown
Contributor Author

Then I suppose it would make sense. The question is, would there be a reason to want to control them separately?

@SimonSapin SimonSapin force-pushed the override_malloc_on_supported_platforms branch from f485f4f to 6d71767 Compare June 25, 2018 07:24
@SimonSapin SimonSapin force-pushed the override_malloc_on_supported_platforms branch from 6d71767 to 15eb477 Compare June 25, 2018 07:27
@SimonSapin
Copy link
Copy Markdown
Contributor Author

SimonSapin commented Jun 25, 2018

They are separate in jemalloc’s config, so I’ve renamed to unprefixed_malloc_on_supported_platforms in order to stick to what this does, rather than high level goals. We can add separately another flag for --disable-zone-allocator if that’s desirable.

Also added a test and some docs.

@SimonSapin SimonSapin changed the title Rename no_prefix feature to override_malloc_on_supported_platforms Rename no_prefix feature to unperfixed_malloc_on_supported_platforms Jun 25, 2018
@gnzlbg
Copy link
Copy Markdown
Owner

gnzlbg commented Jun 25, 2018

So this LGTM. @glandium, @Amanieu, thoughts? (you might want to check https://github.com/alexcrichton/jemallocator/pull/54 and https://github.com/alexcrichton/jemallocator/pull/53 for context).

@gnzlbg gnzlbg merged commit 6d0185c into gnzlbg:master Jun 25, 2018
@gnzlbg
Copy link
Copy Markdown
Owner

gnzlbg commented Jun 25, 2018

Thanks! If this needs tunning that can be done as new issues are discovered.

@SimonSapin SimonSapin deleted the override_malloc_on_supported_platforms branch June 27, 2018 14:19
BusyJay added a commit to BusyJay/jemallocator that referenced this pull request Jan 11, 2026
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