diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2007-01-26 18:50:28 -0500 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2007-01-26 18:50:28 -0500 |
commit | 6d9d0c68b574ceba53fc36d34b83f7109e00b1d0 (patch) | |
tree | 8004fcb5879cd81d738bd750441fbc900208e049 /src/base/timebuf.hh | |
parent | c215d54aac6925cf13079d8d8fe3691451a77ce1 (diff) | |
parent | fd8a4ff5a8a9ea65e227f0b4000dfcda06d4764f (diff) | |
download | gem5-6d9d0c68b574ceba53fc36d34b83f7109e00b1d0.tar.xz |
Merge zizzer:/bk/newmem
into zeep.pool:/z/saidi/work/m5.suncc
--HG--
extra : convert_revision : 1706f6218abec7eb575dcff3ad4aef83894f64ab
Diffstat (limited to 'src/base/timebuf.hh')
-rw-r--r-- | src/base/timebuf.hh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/base/timebuf.hh b/src/base/timebuf.hh index 1d0de8278..348f7a673 100644 --- a/src/base/timebuf.hh +++ b/src/base/timebuf.hh @@ -33,6 +33,7 @@ #define __BASE_TIMEBUF_HH__ #include <cassert> +#include <cstring> #include <vector> template <class T> @@ -143,7 +144,7 @@ class TimeBuffer char *ptr = data; for (int i = 0; i < size; i++) { index[i] = ptr; - memset(ptr, 0, sizeof(T)); + std::memset(ptr, 0, sizeof(T)); new (ptr) T; ptr += sizeof(T); } @@ -171,7 +172,7 @@ class TimeBuffer if (ptr >= size) ptr -= size; (reinterpret_cast<T *>(index[ptr]))->~T(); - memset(index[ptr], 0, sizeof(T)); + std::memset(index[ptr], 0, sizeof(T)); new (index[ptr]) T; } |