-
Notifications
You must be signed in to change notification settings - Fork 244
Ban duplicates of parity-uil-mem from being linked into the same program #363
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
Changes from 3 commits
395a6f9
b6418a5
e3519de
496a362
23c6c39
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,10 @@ | |
|
|
||
| Collection of memory related utilities. | ||
|
|
||
| ## WARNING | ||
|
|
||
| Defining a global allocator outside of this library is only safe for no-std environments or when `estimate-heapsize` is used. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this should be expanded on.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See #364 and paritytech/polkadot#922.
I'm happy to expand the warning, just let me know what would be the best wording here.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems like we need a whole paragraph here and I'm still too confused to write it. :/ In your "turd" example you have two "Defining a global allocator not via a feature of parity-util-mem." – this is what happened for the parachain WASM upgrade test right? But how did that even compile? Because the crate itself doesn't pull in Anyway maybe something like this: "When
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Because cargo allows to have multiple versions of the same crate. So one (incompatible with the other) version doesn't define a global allocator (and expects to use the system allocator), so it expect a
This particular case is safe because it's only defined for no-std. |
||
|
|
||
| ## Features | ||
|
|
||
| - estimate-heapsize : Do not use allocator, but `size_of` or `size_of_val`. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| fn main() {} |
Uh oh!
There was an error while loading. Please reload this page.