summaryrefslogtreecommitdiff
path: root/memory.c
diff options
context:
space:
mode:
authorrob rob@31f1291d-b8d6-0310-a050-a5561fc1590b <rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2004-07-19 14:08:30 +0000
committerrob rob@31f1291d-b8d6-0310-a050-a5561fc1590b <rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2004-07-19 14:08:30 +0000
commita1479a87757fb5e9b48f3c8bb5dd9cc247406f1a (patch)
tree06d23a51082a398c512ed8f1e39bdac60d4dd658 /memory.c
parent7fffea77edbe72cd66f7a55f41a3966204f9cf86 (diff)
BUILD : 1.7.4 (264) BUGS : N/A NOTES : Switched to autoconf - try to commit part 1
git-svn-id: svn://svn.anope.org/anope/trunk@264 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@169 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'memory.c')
-rw-r--r--memory.c96
1 files changed, 0 insertions, 96 deletions
diff --git a/memory.c b/memory.c
deleted file mode 100644
index 25c9bd328..000000000
--- a/memory.c
+++ /dev/null
@@ -1,96 +0,0 @@
-/* Memory management routines.
- *
- * (C) 2003 Anope Team
- * Contact us at info@anope.org
- *
- * Please read COPYING and README for furhter details.
- *
- * Based on the original code of Epona by Lara.
- * Based on the original code of Services by Andy Church.
- *
- * $Id$
- *
- */
-
-#include "services.h"
-
-/*************************************************************************/
-/*************************************************************************/
-
-/* smalloc, scalloc, srealloc, sstrdup:
- * Versions of the memory allocation functions which will cause the
- * program to terminate with an "Out of memory" error if the memory
- * cannot be allocated. (Hence, the return value from these functions
- * is never NULL.)
- */
-
-void *smalloc(long size)
-{
- void *buf;
-
- if (!size) {
- size = 1;
- }
- buf = malloc(size);
- if (!buf)
-#if !defined(USE_THREADS) || !defined(LINUX20)
- raise(SIGUSR1);
-#else
- abort();
-#endif
- return buf;
-}
-
-void *scalloc(long elsize, long els)
-{
- void *buf;
-
- if (!elsize || !els) {
- elsize = els = 1;
- }
- buf = calloc(elsize, els);
- if (!buf)
-#if !defined(USE_THREADS) || !defined(LINUX20)
- raise(SIGUSR1);
-#else
- abort();
-#endif
- return buf;
-}
-
-void *srealloc(void *oldptr, long newsize)
-{
- void *buf;
-
- if (!newsize) {
- newsize = 1;
- }
- buf = realloc(oldptr, newsize);
- if (!buf)
-#if !defined(USE_THREADS) || !defined(LINUX20)
- raise(SIGUSR1);
-#else
- abort();
-#endif
- return buf;
-}
-
-char *sstrdup(const char *s)
-{
- char *t = strdup(s);
- if (!t)
-#if !defined(USE_THREADS) || !defined(LINUX20)
- raise(SIGUSR1);
-#else
- abort();
-#endif
- return t;
-}
-
-/*************************************************************************/
-/*************************************************************************/
-
-/* In the future: malloc() replacements that tell us if we're leaking and
- * maybe do sanity checks too... */
-
-/*************************************************************************/