Update of /cvsroot/monetdb/pathfinder/compiler/schema
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv24398/schema
Modified Files:
import.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: import.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/schema/import.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- import.c 24 Feb 2008 17:22:28 -0000 1.25
+++ import.c 17 Mar 2008 17:41:28 -0000 1.26
@@ -576,7 +576,7 @@
PFqname_raw_t qn_raw;
PFarray_t *attrs;
- attrs = PFarray (sizeof (char *));
+ attrs = PFarray_default (sizeof (char *));
/* push namespace scope marker */
push_ns (NULL);
@@ -2393,16 +2393,16 @@
state = 0;
/* creates a new stack (state stack) */
- state_stack = PFarray (sizeof (int));
+ state_stack = PFarray_default (sizeof (int));
/* pushes a first dummy element on the state stack */
push_state (-1);
/* creates a new stack (pf_type stack) */
- type_stack = PFarray (sizeof (PFty_t));
+ type_stack = PFarray_default (sizeof (PFty_t));
/* creates a new stack (attr_stack) */
- attr_stack = PFarray (sizeof (PFarray_t*));
+ attr_stack = PFarray_default (sizeof (PFarray_t*));
/* creates a new stack (ns_stack) */
- ns_stack = PFarray (sizeof (PFns_t*));
+ ns_stack = PFarray_default (sizeof (PFns_t*));
/* temporarily: ignore any libxml2 errors */
xmlSetGenericErrorFunc (0, silent_error);
-------------------------------------------------------------------------
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