From: J"orn Rennecke <joern.rennecke@arc.com> (tiny change)

Speed up simulator startup:
        * sim-utils.c (zalloc): Use xcalloc.
This commit is contained in:
Joel Brobecker 2009-03-19 14:32:38 +00:00
parent c31af87b2e
commit 982807ce66
2 changed files with 7 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2009-03-19 J"orn Rennecke <joern.rennecke@arc.com> (tiny change)
Speed up simulator startup:
* sim-utils.c (zalloc): Use xcalloc.
2009-01-07 Hans-Peter Nilsson <hp@axis.com>
* cgen-ops.h (ADDQI, SUBQI, MULQI, NEGQI, ABSQI, ADDHI, SUBHI)

View File

@ -52,15 +52,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
Set by sim_resume. */
struct sim_state *current_state;
/* Allocate zero filled memory with xmalloc - xmalloc aborts of the
/* Allocate zero filled memory with xcalloc - xcalloc aborts if the
allocation fails. */
void *
zalloc (unsigned long size)
{
void *memory = (void *) xmalloc (size);
memset (memory, 0, size);
return memory;
return xcalloc (1, size);
}
void