diff options
author | Pixel <Pixel> | 2001-10-29 15:44:12 +0000 |
---|---|---|
committer | Pixel <Pixel> | 2001-10-29 15:44:12 +0000 |
commit | 2e5bed84841f33ff28dd95b77b555720c875a286 (patch) | |
tree | de6cbcbf5fa65e90e1888d52a9426373a1638c61 /lib/Exceptions.cc | |
parent | 0a6190d0269392e875a479df01b152d47ea4143c (diff) |
Beginning task manager
Diffstat (limited to 'lib/Exceptions.cc')
-rw-r--r-- | lib/Exceptions.cc | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/lib/Exceptions.cc b/lib/Exceptions.cc index 0376fee..3989836 100644 --- a/lib/Exceptions.cc +++ b/lib/Exceptions.cc @@ -9,24 +9,6 @@ char GeneralException::t[BUFSIZ]; -char * Base::strdup(const char * s) const { - return xstrdup(s); -} - -void * Base::malloc(ssize_t s) const { - return xmalloc(s); -} - - -void * Base::operator new(size_t s) { - return memset(xmalloc(s), 0, s); -} - -void * Base::operator new(size_t s, void * p) { - memset(p, 0, s); - return p; -} - GeneralException::GeneralException(String emsg) : msg(emsg.strdup()) { } GeneralException::GeneralException() : msg(0) { } GeneralException::GeneralException(const GeneralException & e) : msg(strdup(e.msg)) { } @@ -75,10 +57,14 @@ void * xmalloc(ssize_t s) throw (MemoryException) { throw MemoryException(s); } + memset(r, 0, s); + return r; } +#ifdef OVER_FREE #undef free +#endif void xfree(void *& p) { if (p) { |