Skip to content
This repository has been archived by the owner on Dec 17, 2020. It is now read-only.

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

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

Comments

@glandium
Copy link

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
Copy link

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
Copy link
Collaborator

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.

@SimonSapin
Copy link

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

Looks like I misread, it was not.

It is now with https://phabricator.services.mozilla.com/D71742

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants