Revision: 54570
          http://brlcad.svn.sourceforge.net/brlcad/?rev=54570&view=rev
Author:   brlcad
Date:     2013-03-08 15:47:51 +0000 (Fri, 08 Mar 2013)
Log Message:
-----------
stub in calls to the new bu_heap get/put API underneath BU_GET/BU_PUT, but do 
not enable for the time being because all of the existing BU_GET calls need to 
be reviewed to be either paired with BU_PUT or converted to BU_ALLOC.

Modified Paths:
--------------
    brlcad/trunk/include/bu.h

Modified: brlcad/trunk/include/bu.h
===================================================================
--- brlcad/trunk/include/bu.h   2013-03-08 15:44:07 UTC (rev 54569)
+++ brlcad/trunk/include/bu.h   2013-03-08 15:47:51 UTC (rev 54570)
@@ -247,7 +247,11 @@
  * are relatively large, infrequently allocated, or otherwise don't
  * need to be fast.
  */
+#if 0
+#define BU_GET(_ptr, _type) _ptr = (_type *)bu_heap_get(sizeof(_type))
+#else
 #define BU_GET(_ptr, _type) _ptr = (_type *)bu_calloc(1, sizeof(_type), #_type 
" (BU_GET) " BU_FLSTR)
+#endif
 
 /**
  * Handy dynamic memory deallocator macro.  Deallocated memory has the
@@ -257,7 +261,11 @@
  * Memory acquired with bu_malloc()/bu_calloc() should be returned
  * with bu_free(), NOT with BU_PUT().
  */
+#if 0
+#define BU_PUT(_ptr, _type) *(uint8_t *)(_ptr) = /*zap*/ 0; bu_heap_put(_ptr, 
sizeof(_type)); _ptr = NULL
+#else
 #define BU_PUT(_ptr, _type) *(uint8_t *)(_ptr) = /*zap*/ 0; bu_free(_ptr, 
#_type " (BU_PUT) " BU_FLSTR); _ptr = NULL
+#endif
 
 /**
  * Convenience macro for allocating a single structure on the heap.
@@ -6255,6 +6263,7 @@
 
 /** @} file */
 
+
 /** @file libbu/ctype.c
  *
  * Routines for checking ctypes.

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to