From 685130b75cceecfd317a941403dd5b47168b4419 Mon Sep 17 00:00:00 2001 From: Matt Witherspoon <32485495+spoonincode@users.noreply.github.com> Date: Fri, 23 Feb 2018 16:35:57 -0500 Subject: [PATCH] Remove memset on malloc heap init The wasm runtime guarantees that fresh pages are zero filled. Not seeing any reason to do a memset on heap init since that memory will be zeroed already anyways. --- contracts/eosiolib/eosiolib.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/contracts/eosiolib/eosiolib.cpp b/contracts/eosiolib/eosiolib.cpp index d72f79e30a3..7a7f7b1b672 100644 --- a/contracts/eosiolib/eosiolib.cpp +++ b/contracts/eosiolib/eosiolib.cpp @@ -202,7 +202,6 @@ namespace eosio { { _heap_size = size; _heap = mem_heap; - memset(_heap, 0, _heap_size); } uint32_t is_init() const