Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
argo
aml
Commits
7b3fe6c2
Commit
7b3fe6c2
authored
Dec 09, 2020
by
Nicolas Denoyelle
Committed by
Swann Perarnau
Dec 09, 2020
Browse files
Fix replace mmap with malloc to avoid map_anonymous warning
parent
ff3cd379
Pipeline
#12138
passed with stages
in 11 minutes and 40 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
doc/tutorials/area/0_aml_area_cuda.c
View file @
7b3fe6c2
...
...
@@ -92,16 +92,13 @@ int main(void)
return
77
;
const
size_t
size
=
(
2
<<
16
);
// 16 pages
void
*
host_buf
=
mmap
(
NULL
,
size
,
PROT_READ
|
PROT_WRITE
,
MAP_PRIVATE
|
MAP_ANONYMOUS
,
0
,
0
);
void
*
host_buf
=
malloc
(
size
);
if
(
host_buf
==
NULL
)
return
1
;
test_default_area
(
size
,
host_buf
);
test_custom_area
(
size
,
host_buf
);
munmap
(
host_buf
,
size
);
free
(
host_buf
);
return
0
;
}
Write
Preview
Supports
Markdown
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!
Cancel
Please
register
or
sign in
to comment