Sign in
android
/
platform
/
external
/
swig
/
d0f0f90be16c2ac553b5fa08512045273135147a
/
.
/
Examples
/
test-suite
/
javascript
/
li_cmalloc_runme.js
blob: 5c2ba850d02410c518cf20fc75a84df7e82ccd06 [
file
] [
log
] [
blame
]
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
;
}