-
Notifications
You must be signed in to change notification settings - Fork 112
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
move mallocx_align to jemalloc-sys and expose it via the ffi module #27
Conversation
How come? Ideally this crate is pretty conservative in its API, so why would we expose this? |
This crates exposes the
@SimonSapin suggested removing |
|
If the |
@SimonSapin doesn't it still make sense to expose a One might want to compute the "alignment" like I'll move |
That is what |
Not really, at least not with the current state of affairs where we use the
MIN_ALIGN and the size, mallocx_align uses either of those :/
I am not saying we must expose this api “as is” but maybe we should improve
the API and expose that instead. All allocation methods use align to flags
right now.
…On Fri 24. Nov 2017 at 18:03, Simon Sapin ***@***.***> wrote:
One might want to compute the "alignment" like jemalloctor does
internally, but bitwise-or it with other jemalloc flags.
That is what mallocx_align does.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<https://github.com/alexcrichton/jemallocator/pull/27#issuecomment-346869685>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA3NpnE-WNoa3I6g6E7--6HbiXe7NI2Pks5s5vacgaJpZM4Qor4r>
.
|
Replicating the exact flag-setting strategy of |
I agree that it is not an easy choice but iff we could at least offer a
safe choice that would already be worth it.
I mean that particular issue has shown that making a safe choice for Rust
programs at all isn’t easy :/ expecting others to come with other safe
choices that perform good is unrealistic, because it is very tricky to do
so.
…On Fri 24. Nov 2017 at 20:34, Simon Sapin ***@***.***> wrote:
Replicating the exact flag-setting strategy of jemallocator while not
using jemallocator is a choice you can make, it is not a "must". And I’m
not convinced it’s a good idea: it was buggy (rust-lang/rust#45955
<rust-lang/rust#45955>) at least since #25
<https://github.com/alexcrichton/jemallocator/pull/25>, and even now its
validity is shaky.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<https://github.com/alexcrichton/jemallocator/pull/27#issuecomment-346887349>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA3NptEj9e23-nNi7OJLtaKWndy-fX6Hks5s5xpjgaJpZM4Qor4r>
.
|
So i've just moved #35 renames |
If this is a macro can it have the same name as C? |
Alex in C it has the same name but all in caps, I am so sorry about the
amount at pull requests. I did not realize it was thanks giving over there
and I am fully booked till tomorrow so I have only very squeezed in amounts
of time in between to rebase them on master. Please hold on on everything
that looks like an optimization till the benchmarks are merged, and also
even though some PRs are green they might break each other once they get
merged so it might be better to just retry each PR on Travis after each
merge. I tried to set up appveyor this morning but I couldn’t finish that
before I left :/ I’ll try to do that tomorrow.
…On Sat 25. Nov 2017 at 16:13, Alex Crichton ***@***.***> wrote:
If this is a macro can it have the same name as C?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<https://github.com/alexcrichton/jemallocator/pull/27#issuecomment-346946366>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA3NpswJ2qoBKwYVvRSvqgZyk30fiF5gks5s6C6UgaJpZM4Qor4r>
.
|
Ah yeah that's just what I mean about changing the name to Also no worries on all the PRs! It is a little overwhelming but just takes time to get through. |
@alexcrichton that's a good idea, I've named it all in caps like the C macro. |
Looks great! |
No description provided.