From 2e5bed84841f33ff28dd95b77b555720c875a286 Mon Sep 17 00:00:00 2001 From: Pixel Date: Mon, 29 Oct 2001 15:44:12 +0000 Subject: Beginning task manager --- lib/Exceptions.cc | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) (limited to 'lib/Exceptions.cc') 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) { -- cgit v1.2.3