FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
binaryen/test/grow_memory.cpp at waitqueue-api · WebAssembly/binaryen · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
WebAssembly
/
binaryen
Public
Notifications
You must be signed in to change notification settings
Fork
881
Star
8.6k
Code
Issues
339
Pull requests
221
Discussions
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
binaryen
/
test
/
grow_memory.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
15 lines (13 loc) · 353 Bytes
Breadcrumbs
binaryen
/
test
/
grow_memory.cpp
Copy path
File metadata and controls
15 lines (13 loc) · 353 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#
include
<
emscripten.h
>
#
include
<
stdio.h
>
#
include
<
stdlib.h
>
volatile
int
writeOnly;
int
main
() {
EM_ASM
({
assert
(
HEAPU8
.
length
== =
16
*
1024
*
1024
); });
for
(
int
i =
0
; i <
20
; i++) {
printf
(
"
alloc 1MB: %d
\n
"
, i);
writeOnly = (
int
)
malloc
(
1024
*
1024
);
}
EM_ASM
({
assert
(
HEAPU8
.
length
>
16
*
1024
*
1024
); });
printf
(
"
ok.
\n
"
);
}
Back
|
FazBrowse Home
|
New Git URL