* sim-core.c (sim_core_attach): Use xmalloc instead of zalloc.
authorDoug Evans <dje@google.com>
Mon, 2 Mar 1998 18:20:39 +0000 (18:20 +0000)
committerDoug Evans <dje@google.com>
Mon, 2 Mar 1998 18:20:39 +0000 (18:20 +0000)
(sim_core_map_detach): Use free instead of zfree.

sim/common/ChangeLog
sim/common/sim-core.c

index d7753593b40fd25281a71af4918eecab66772c6e..034201c9f5bff1366900d7ea071b111d3fff0d71 100644 (file)
@@ -1,3 +1,8 @@
+Mon Mar  2 10:20:06 1998  Doug Evans  <devans@seba.cygnus.com>
+
+       * sim-core.c (sim_core_attach): Use xmalloc instead of zalloc.
+       (sim_core_map_detach): Use free instead of zfree.
+
 Fri Feb 27 19:09:57 1998  Doug Evans  <devans@canuck.cygnus.com>
 
        * sim-module.c (*): Fix typos in assertion tests.
index f6db47acf84a13e497eda6c476c86c9e3b9f424c..6444f2ee2783a4f85c13781b4767acaae834b3fc 100644 (file)
@@ -22,6 +22,7 @@
 #ifndef _SIM_CORE_C_
 #define _SIM_CORE_C_
 
+#include "libiberty.h"
 #include "sim-main.h"
 #include "sim-assert.h"
 
@@ -338,7 +339,7 @@ sim_core_attach (SIM_DESC sd,
       if (optional_buffer == NULL)
        {
          int padding = (addr % sizeof (unsigned64));
-         free_buffer = zalloc ((modulo == 0 ? nr_bytes : modulo) + padding);
+         free_buffer = xmalloc ((modulo == 0 ? nr_bytes : modulo) + padding);
          buffer = (char*) free_buffer + padding;
        }
       else
@@ -422,7 +423,7 @@ sim_core_map_detach (SIM_DESC sd,
          sim_core_mapping *dead = (*entry);
          (*entry) = dead->next;
          if (dead->free_buffer != NULL)
-           zfree (dead->free_buffer);
+           free (dead->free_buffer);
          zfree (dead);
          return;
        }
This page took 0.044108 seconds and 4 git commands to generate.