Update of /cvsroot/monetdb/pathfinder/compiler/algebra/map
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv24398/algebra/map

Modified Files:
        intro_proxy.c intro_thetajoin.c map_ori_names.c 
        map_unq_names.c 
Log Message:
-- Extended the PFarray_t type to store a ``clear'' bit
   that ensures that memory is erased during allocation.

-- Split up PFarray (size_t itemsize) into four variants

   o PFarray_default (size_t itemsize),
   o PFcarray_default (size_t itemsize),
   o PFarray (size_t itemsize, unsigned int slots), and
   o PFcarray (size_t itemsize, unsigned int slots)

   where the '_default' variants are currently seeded with 20 slots,
   the 'c' variants provide a cleared chunk of memory, and the slots
   argument indicates how much memory is initially allocated (#slots).

-- Added memory debugging support for arrays:
   If the environment variable ``PF_DEBUG_MEMORY'' is set the memory
   reallocation for arrays reports the function that requires more
   memory (and thus more slots for the storage).


REMARK: Currently the inital array sizes (#slots) are good guesses
        about the upper limit of required slots. Anybody adding new
        PFarray calls may start with a very low value. This way the
        the debug printing may report (reallocation) problems in
        comparison to a very high initial value whose consequences
        might not be directly visible.



Index: intro_proxy.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/map/intro_proxy.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- intro_proxy.c       16 Feb 2008 19:42:39 -0000      1.33
+++ intro_proxy.c       17 Mar 2008 17:41:13 -0000      1.34
@@ -1176,7 +1176,7 @@
        of the left branch. It will be later used to replace
        the rowid operator. (We thus do not need the
        list of exit references for both branches.) */
-    left_exit_refs = PFarray (sizeof (PFla_op_t *));
+    left_exit_refs = PFarray (sizeof (PFla_op_t *), 10);
     (void) exit_refs;
 
     /* mark nodes in the left branch as INside and
@@ -2625,7 +2625,7 @@
         cur_col = proxy1->sem.proxy.req_cols.atts[i];
         req_col_names[i] = PFalg_proj (cur_col, cur_col);
     }
-    new_col_names = PFarray (sizeof (PFalg_att_t));
+    new_col_names = PFarray (sizeof (PFalg_att_t), 10);
 
     /* In req_col_names we store the mappings of the required column
        names (collect_mappings updates the columns names as side effect)
@@ -2989,8 +2989,8 @@
                   PFarray_t *checked_nodes)
 {
     PFla_op_t *proxy_entry, *proxy_exit;
-    PFarray_t *exit_refs     = PFarray (sizeof (PFla_op_t *));
-    PFarray_t *conflict_list = PFarray (sizeof (PFla_op_t *));
+    PFarray_t *exit_refs     = PFarray (sizeof (PFla_op_t *), 10);
+    PFarray_t *conflict_list = PFarray (sizeof (PFla_op_t *), 10);
 
     bool found_proxy = true;
     bool rewrote_proxy = false;
@@ -3062,7 +3062,7 @@
 PFla_op_t *
 PFintro_proxies (PFla_op_t *root)
 {
-    PFarray_t *checked_nodes = PFarray (sizeof (PFla_op_t *));
+    PFarray_t *checked_nodes = PFarray (sizeof (PFla_op_t *), 50);
 
     /* remove all semijoin operators as most of our
        proxies cannot cope with semijoins and thus

Index: intro_thetajoin.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/map/intro_thetajoin.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- intro_thetajoin.c   15 Feb 2008 12:16:00 -0000      1.16
+++ intro_thetajoin.c   17 Mar 2008 17:41:13 -0000      1.17
@@ -700,7 +700,7 @@
 PFla_op_t *
 PFintro_thetajoins (PFla_op_t *root)
 {
-    PFarray_t *select_nodes = PFarray (sizeof (PFla_op_t *));
+    PFarray_t *select_nodes = PFarray (sizeof (PFla_op_t *), 20);
     PFla_op_t *select, *join;
 
     /* collect the select nodes */

Index: map_ori_names.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/map/map_ori_names.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- map_ori_names.c     16 Feb 2008 19:42:39 -0000      1.31
+++ map_ori_names.c     17 Mar 2008 17:41:13 -0000      1.32
@@ -1015,7 +1015,7 @@
 PFla_op_t *
 PFmap_ori_names (PFla_op_t *root)
 {
-    PFarray_t *map = PFarray (sizeof (ori_unq_map));
+    PFarray_t *map = PFarray (sizeof (ori_unq_map), 300);
 
     /* infer original bit-encoded names */
     PFprop_infer_ori_names (root);

Index: map_unq_names.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/algebra/map/map_unq_names.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- map_unq_names.c     16 Feb 2008 19:42:39 -0000      1.30
+++ map_unq_names.c     17 Mar 2008 17:41:13 -0000      1.31
@@ -928,7 +928,7 @@
 PFla_op_t *
 PFmap_unq_names (PFla_op_t *root)
 {
-    PFarray_t *map = PFarray (sizeof (ori_unq_map));
+    PFarray_t *map = PFarray (sizeof (ori_unq_map), 300);
 
     /* infer unique names */
     PFprop_infer_unq_names (root);


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to