Sign in
◑
Theme
fuchsia
/
third_party
/
swig
/
725bc081da170662b194ca1ff5e7e75144bc0760
/
.
/
Examples
/
test-suite
/
javascript
/
li_cmalloc_runme.js
blob: 5c2ba850d02410c518cf20fc75a84df7e82ccd06 [
file
]
var
li_cmalloc
=
require
(
"li_cmalloc"
);
p
=
li_cmalloc
.
malloc_int
(
1
);
li_cmalloc
.
free_int
(
p
);
ok
=
false
;
try
{
p
=
li_cmalloc
.
calloc_int
(-
1
);
li_cmalloc
.
free_int
(
p
);
}
catch
{
ok
=
true
;
}
if
(!
ok
)
{
throw
new
Error
;
}