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

Should use the global allocator functions rather than extern "C" malloc/realloc #5

Open
glandium opened this issue Jun 11, 2019 · 2 comments

Comments

Projects
None yet
3 participants
@glandium
Copy link

commented Jun 11, 2019

alloc (https://doc.rust-lang.org/std/alloc/fn.alloc.html) and realloc (https://doc.rust-lang.org/std/alloc/fn.realloc.html) have been stabilized in rust 1.28, and would be safer to use than extern "C" malloc/realloc.

@SimonSapin

This comment has been minimized.

Copy link

commented Jun 11, 2019

This is implemented in https://searchfox.org/mozilla-central/source/servo/components/fallible/lib.rs.

By the way, are these two crates redundant? It looks like we could remove fallible and make Stylo use mp4parse_fallible (despite its name)

@kinetiknz

This comment has been minimized.

Copy link
Collaborator

commented Jun 11, 2019

By the way, are these two crates redundant?

I think so. From memory, mp4parse_fallible started as a clone of Stylo's fallible.rs and was created only because mp4parse couldn't easily use the existing Stylo fallible module. I'd be happy if the code was shared.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.