Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
polkadot-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
parity
Mirrored projects
polkadot-sdk
Commits
e6c7149f
Commit
e6c7149f
authored
6 years ago
by
Dmitry Kashitsyn
Browse files
Options
Downloads
Patches
Plain Diff
Fixes WasmAllocator to reflect recent nightly API changes
parent
4dc6af80
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
substrate/substrate/pwasm-alloc/src/lib.rs
+4
-4
4 additions, 4 deletions
substrate/substrate/pwasm-alloc/src/lib.rs
with
4 additions
and
4 deletions
substrate/substrate/pwasm-alloc/src/lib.rs
+
4
−
4
View file @
e6c7149f
...
...
@@ -20,16 +20,16 @@ mod __impl {
extern
crate
alloc
;
extern
crate
pwasm_libc
;
use
self
::
alloc
::
heap
::
{
GlobalAlloc
,
Layout
,
Opaque
};
use
core
::
alloc
::{
GlobalAlloc
,
Layout
};
use
super
::
WasmAllocator
;
unsafe
impl
GlobalAlloc
for
WasmAllocator
{
unsafe
fn
alloc
(
&
self
,
layout
:
Layout
)
->
*
mut
Opaque
{
pwasm_libc
::
malloc
(
layout
.size
())
as
*
mut
Opaque
unsafe
fn
alloc
(
&
self
,
layout
:
Layout
)
->
*
mut
u8
{
pwasm_libc
::
malloc
(
layout
.size
())
as
*
mut
u8
}
unsafe
fn
dealloc
(
&
self
,
ptr
:
*
mut
Opaque
,
_layout
:
Layout
)
{
unsafe
fn
dealloc
(
&
self
,
ptr
:
*
mut
u8
,
_layout
:
Layout
)
{
pwasm_libc
::
free
(
ptr
as
*
mut
u8
)
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment