Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
relibc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
redox-os
relibc
Commits
9d24e615
Commit
9d24e615
authored
6 years ago
by
Jeremy Soller
Browse files
Options
Downloads
Patches
Plain Diff
Use alloc_aligned and free functions in platform for global allocator
parent
706a8de7
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/platform/allocator/dlmalloc.rs
+2
-2
2 additions, 2 deletions
src/platform/allocator/dlmalloc.rs
with
2 additions
and
2 deletions
src/platform/allocator/dlmalloc.rs
+
2
−
2
View file @
9d24e615
...
@@ -13,11 +13,11 @@ pub struct Allocator;
...
@@ -13,11 +13,11 @@ pub struct Allocator;
unsafe
impl
<
'a
>
GlobalAlloc
for
Allocator
{
unsafe
impl
<
'a
>
GlobalAlloc
for
Allocator
{
unsafe
fn
alloc
(
&
self
,
layout
:
Layout
)
->
*
mut
u8
{
unsafe
fn
alloc
(
&
self
,
layout
:
Layout
)
->
*
mut
u8
{
dlmem
align
(
layout
.
align
(),
layout
.
size
())
as
*
mut
u8
alloc_
align
(
layout
.
size
(),
layout
.
align
())
as
*
mut
u8
}
}
unsafe
fn
dealloc
(
&
self
,
ptr
:
*
mut
u8
,
_layout
:
Layout
)
{
unsafe
fn
dealloc
(
&
self
,
ptr
:
*
mut
u8
,
_layout
:
Layout
)
{
dl
free
(
ptr
as
*
mut
c_void
)
free
(
ptr
as
*
mut
c_void
)
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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