summaryrefslogtreecommitdiff
path: root/src/memory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/memory.cpp')
-rw-r--r--src/memory.cpp46
1 files changed, 0 insertions, 46 deletions
diff --git a/src/memory.cpp b/src/memory.cpp
index 1fb1d2b21..12e0a1d08 100644
--- a/src/memory.cpp
+++ b/src/memory.cpp
@@ -21,25 +21,6 @@
/*************************************************************************/
/**
- * malloc, replacement so we can trap for "out of memory"
- * @param size to allocate
- * @return void
- */
-void *smalloc(long size)
-{
- void *buf;
-
- if (!size)
- size = 1;
- buf = malloc(size);
- if (!buf)
- abort();
- return buf;
-}
-
-/*************************************************************************/
-
-/**
* calloc, replacement so we can trap for "out of memory"
* @param elsize to allocate
* @param els size of members
@@ -78,33 +59,6 @@ void *srealloc(void *oldptr, long newsize)
}
/*************************************************************************/
-
-/**
- * strdup, replacement so we can trap for "out of memory"
- * @param oldptr Old Pointer
- * @param newsize Size of new pointer
- * @return void
- */
-char *sstrdup(const char *src)
-{
- char *ret = NULL;
- if (src)
- {
- ret = new char[strlen(src) + 1];
- if (!ret)
- abort();
- strcpy(ret, src);
- }
- else
- {
- Alog() << "sstrdup() called with NULL-arg";
- abort();
- }
-
- return ret;
-}
-
-/*************************************************************************/
/*************************************************************************/
/* In the future: malloc() replacements that tell us if we're leaking and