GitLab will be upgraded to the 12.10.14-ce.0 on 28 Sept 2020 at 2.00pm (AEDT) to 2.30pm (AEDT). During the update, GitLab and Mattermost services will not be available. If you have any concerns with this, please talk to us at N110 (b) CSIT building.

Commit 1755225a authored by Isaac Oscar Gariano's avatar Isaac Oscar Gariano

Zero memory when we malloc it...

parent c824426b
......@@ -118,7 +118,7 @@ lazy_static! {
vec![]);
pub static ref MALLOC : RuntimeEntrypoint = RuntimeEntrypoint::new(
"malloc",
"alloc_mem_zero",
vec![UINT64_TYPE.clone()],
vec![ADDRESS_TYPE.clone()]);
}
......
......@@ -82,3 +82,7 @@ int32_t c_check_result() {
char * alloc_mem(size_t size){
return (char *) malloc(size);
}
void* alloc_mem_zero(size_t size){
return calloc(size, 1);
}
......@@ -54,3 +54,7 @@ void* resolve_symbol(const char* sym) {
// printf("%s\n", sym);
return dlsym(RTLD_DEFAULT, sym);
}
void* alloc_mem_zero(size_t size){
return calloc(size, 1);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment