[Gridflow-cvs] [svn] commit: r4072 - /trunk/gridflow.c

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Tue Sep 16 19:23:34 EDT 2008


Author: matju
Date: Tue Sep 16 19:23:33 2008
New Revision: 4072

Log:
remove custom global allocator

Modified:
    trunk/gridflow.c

Modified: trunk/gridflow.c
==============================================================================
--- trunk/gridflow.c (original)
+++ trunk/gridflow.c Tue Sep 16 19:23:33 2008
@@ -181,36 +181,6 @@
 	for (; n>4; in+=4, out+=4, n-=4) *(int32*)out = *(int32*)in;
 	for (; n; in++, out++, n--) *out=*in;
 }
-
-//----------------------------------------------------------------
-
-//#define DEBUG
-
-extern "C" {
-    void *gfmalloc(size_t n) {
-#ifdef DEBUG
-	static long cumul=0;
-	uint64 t = gf_timeofday();
-#endif
-	void *p = memalign(16,n);
-	long align = (long)p & 15;
-	if (align) fprintf(stderr,"malloc alignment = %ld mod 16\n",align);
-#ifdef DEBUG
-	t = gf_timeofday() - t; cumul += t; post("malloc p=%p bytes=%ld time=%ld cumul=%ld",p,(long)n,(long)t,(long)cumul);
-#endif
-	return p;
-    }
-    void gffree(void *p) {
-#ifdef DEBUG
-	static long cumul=0;
-	uint64 t = gf_timeofday();
-#endif
-	free(p);
-#ifdef DEBUG
-	t = gf_timeofday() - t; cumul += t; post("free   p=%p           time=%ld cumul=%ld",p,        (long)t,(long)cumul);
-#endif
-    }
-};
 
 //----------------------------------------------------------------
 



More information about the Gridflow-cvs mailing list