Index: trunk/Nebulous/nebclient/src/xmalloc.c
===================================================================
--- trunk/Nebulous/nebclient/src/xmalloc.c	(revision 4677)
+++ trunk/Nebulous/nebclient/src/xmalloc.c	(revision 19553)
@@ -4,5 +4,5 @@
  * Copyright (C) 2003-2005  Joshua Hoblitt, 2003  Robert Lupton
  *
- * $Id: xmalloc.c,v 1.3 2005-07-30 02:45:31 jhoblitt Exp $
+ * $Id: xmalloc.c,v 1.4 2008-09-15 21:24:30 jhoblitt Exp $
  */
 
@@ -11,11 +11,24 @@
 #include "xmalloc.h"
 
+//#define USE_EFF 1
+#ifdef USE_EFF
+#include "efence.h"
+#endif
+
 /*****************************************************************************/
 /*
  * Wrappers for malloc/free.  xmalloc cannot fail.
  */
-void * xmalloc(size_t n)
+void * x_xmalloc(
+                const char *file,
+                unsigned int lineno,
+                const char *func,
+                size_t n)
 {
+#ifdef USE_EFF
+   void *ptr = _eff_malloc(n, file, lineno);
+#else
    void *ptr = malloc(n);
+#endif
     
    if (ptr == NULL) {
@@ -27,7 +40,16 @@
 }
 
-void * xrealloc(void *ptr, size_t size)
+void * x_xrealloc(
+                const char *file,
+                unsigned int lineno,
+                const char *func,
+                void *ptr,
+                size_t size)
 {
+#ifdef USE_EFF
+    void *newptr = _eff_realloc(ptr, size, file, lineno);
+#else
     void *newptr = realloc(ptr, size);
+#endif
 
     if (!newptr) {
@@ -39,6 +61,14 @@
 }
  
-void xfree(void *ptr)
+void x_xfree(
+            const char *file,
+            unsigned int lineno,
+            const char *func,
+            void *ptr)
 {
+#ifdef USE_EFF
+    _eff_free(ptr, file, lineno);
+#else
    free(ptr);
+#endif
 }
