diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-02-14 05:14:26 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2011-02-14 05:14:26 +0000 |
commit | 89b28d4d2691a7f44c961cbe69d3f5005c84e193 (patch) | |
tree | a7a57aef192e0989c67a909cb595fbc34ce7638e /sim/mips/interp.c | |
parent | 2085dc2fb8e527a26170aeb89d42f37118e84883 (diff) | |
download | gdb-89b28d4d2691a7f44c961cbe69d3f5005c84e193.tar.gz |
sim: punt zfree()
The sim keeps track of which allocations are zero-ed internally (via
zalloc) and then calls a helper "zfree" function rather than "free".
But this "zfree" function simply calls "free" itself. Since I can
see no point in this and it is simply useless overhead, punt it.
The only real change is in hw-alloc.c where we remove the zalloc_p
tracking, and sim-utils.c where zfree is delete. The rest of the
changes are a simple `sed` from "zfree" to "free".
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'sim/mips/interp.c')
-rw-r--r-- | sim/mips/interp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sim/mips/interp.c b/sim/mips/interp.c index a276d06f9bd..492ae604af0 100644 --- a/sim/mips/interp.c +++ b/sim/mips/interp.c @@ -1285,7 +1285,7 @@ sim_monitor (SIM_DESC sd, { char *path = fetch_str (sd, A0); V0 = sim_io_open (sd, path, (int)A1); - zfree (path); + free (path); break; } @@ -1296,7 +1296,7 @@ sim_monitor (SIM_DESC sd, char *buf = zalloc (nr); V0 = sim_io_read (sd, fd, buf, nr); sim_write (sd, A1, buf, nr); - zfree (buf); + free (buf); } break; @@ -1311,7 +1311,7 @@ sim_monitor (SIM_DESC sd, sim_io_flush_stdout (sd); else if (fd == 2) sim_io_flush_stderr (sd); - zfree (buf); + free (buf); break; } |