I've added more tracking to our libraries. Most queries result in minimal (<200 calls) _malloc activity, But I have found several anomalies. I am listing some representatives below. In the examples below, "step" is the operation. Note also that all queries should have been prepared with sqlite3_prepare_v2 before step is invoked.
step: select distinct FORM_DEFINITIONS.FORM_DEFINITION_OID from FORM_DEFINITIONS, SURVEYS where SURVEYS.SURVEY_OID=:SURVEYS_SURVEY_OID and FORM_DEFINITIONS.FORM_DEFINITION_OID=:FORM_DEFINITIONS_FORM_DEFINITION_OID and FORM_DEFINITIONS.definition_parent=SURVEYS.SURVEY_OID order by FORM_DEFINITIONS.rowid Cumulative Allocated Memory: 430,208 Count of _malloc Calls: 2,255 Cumulative Reallocated Memory: 5,632 Cumulative Reallocated Memory where nil: 0 Count of _realloc Calls: 22 Count of _realloc Calls where nil: 0 Count of _free Calls: 2,258 Cumulative _mallocs by size <= 1kb: 175,232 bytes (2,063 count) 1kb to 4kb: 254,976 bytes (192 count) 4bk to 8kb: 0 bytes (0 count) 8bk to 16kb: 0 bytes (0 count) 16bk to 32kb: 0 bytes (0 count) 32bk to 64kb: 0 bytes (0 count) 64bk to 128kb: 0 bytes (0 count) 128kb to 256kb: 0 bytes (0 count) 256kb to 512kb: 0 bytes (0 count) 512kb to 1024kb: 0 bytes (0 count) > 1mb: 0 bytes (0 count) Cumulative _reallocs by size <= 1kb: 5,632 bytes (22 count) 1kb to 4kb: 0 bytes (0 count) 4bk to 8kb: 0 bytes (0 count) 8bk to 16kb: 0 bytes (0 count) 16bk to 32kb: 0 bytes (0 count) 32bk to 64kb: 0 bytes (0 count) 64bk to 128kb: 0 bytes (0 count) 128kb to 256kb: 0 bytes (0 count) 256kb to 512kb: 0 bytes (0 count) 512kb to 1024kb: 0 bytes (0 count) > 1mb: 0 bytes (0 count) Cumulative _reallocs of nil pointers by size <= 1kb: 0 bytes (0 count) 1kb to 4kb: 0 bytes (0 count) 4bk to 8kb: 0 bytes (0 count) 8bk to 16kb: 0 bytes (0 count) 16bk to 32kb: 0 bytes (0 count) 32bk to 64kb: 0 bytes (0 count) 64bk to 128kb: 0 bytes (0 count) 128kb to 256kb: 0 bytes (0 count) 256kb to 512kb: 0 bytes (0 count) 512kb to 1024kb: 0 bytes (0 count) > 1mb: 0 bytes (0 count) Here is another anomaly: step: insert into background_constraints values ( :sequence_instance_oid , :sequence_definition_oid ) Cumulative Allocated Memory: 426,240 Count of _malloc Calls: 2,221 Cumulative Reallocated Memory: 4,520 Cumulative Reallocated Memory where nil: 0 Count of _realloc Calls: 15 Count of _realloc Calls where nil: 0 Count of _free Calls: 2,233 Cumulative _mallocs by size <= 1kb: 171,264 bytes (2,029 count) 1kb to 4kb: 254,976 bytes (192 count) 4bk to 8kb: 0 bytes (0 count) 8bk to 16kb: 0 bytes (0 count) 16bk to 32kb: 0 bytes (0 count) 32bk to 64kb: 0 bytes (0 count) 64bk to 128kb: 0 bytes (0 count) 128kb to 256kb: 0 bytes (0 count) 256kb to 512kb: 0 bytes (0 count) 512kb to 1024kb: 0 bytes (0 count) > 1mb: 0 bytes (0 count) Cumulative _reallocs by size <= 1kb: 4,520 bytes (15 count) 1kb to 4kb: 0 bytes (0 count) 4bk to 8kb: 0 bytes (0 count) 8bk to 16kb: 0 bytes (0 count) 16bk to 32kb: 0 bytes (0 count) 32bk to 64kb: 0 bytes (0 count) 64bk to 128kb: 0 bytes (0 count) 128kb to 256kb: 0 bytes (0 count) 256kb to 512kb: 0 bytes (0 count) 512kb to 1024kb: 0 bytes (0 count) > 1mb: 0 bytes (0 count) Cumulative _reallocs of nil pointers by size <= 1kb: 0 bytes (0 count) 1kb to 4kb: 0 bytes (0 count) 4bk to 8kb: 0 bytes (0 count) 8bk to 16kb: 0 bytes (0 count) 16bk to 32kb: 0 bytes (0 count) 32bk to 64kb: 0 bytes (0 count) 64bk to 128kb: 0 bytes (0 count) 128kb to 256kb: 0 bytes (0 count) 256kb to 512kb: 0 bytes (0 count) 512kb to 1024kb: 0 bytes (0 count) > 1mb: 0 bytes (0 count)' Example three: step: INSERT INTO QUESTIONNAIRES ( QUESTIONNAIRE_OID, QUESTIONNAIRE_NAME, definition_parent, instance_parent ) values ( :QUESTIONNAIRE_OID, :QUESTIONNAIRE_NAME, :definition_parent, :instance_parent ) Cumulative Allocated Memory: 459,576 Count of _malloc Calls: 2,323 Cumulative Reallocated Memory: 8,184 Cumulative Reallocated Memory where nil: 0 Count of _realloc Calls: 31 Count of _realloc Calls where nil: 0 Count of _free Calls: 2,319 Cumulative _mallocs by size <= 1kb: 180,808 bytes (2,108 count) 1kb to 4kb: 278,768 bytes (215 count) 4bk to 8kb: 0 bytes (0 count) 8bk to 16kb: 0 bytes (0 count) 16bk to 32kb: 0 bytes (0 count) 32bk to 64kb: 0 bytes (0 count) 64bk to 128kb: 0 bytes (0 count) 128kb to 256kb: 0 bytes (0 count) 256kb to 512kb: 0 bytes (0 count) 512kb to 1024kb: 0 bytes (0 count) > 1mb: 0 bytes (0 count) Cumulative _reallocs by size <= 1kb: 6,136 bytes (30 count) 1kb to 4kb: 2,048 bytes (1 count) 4bk to 8kb: 0 bytes (0 count) 8bk to 16kb: 0 bytes (0 count) 16bk to 32kb: 0 bytes (0 count) 32bk to 64kb: 0 bytes (0 count) 64bk to 128kb: 0 bytes (0 count) 128kb to 256kb: 0 bytes (0 count) 256kb to 512kb: 0 bytes (0 count) 512kb to 1024kb: 0 bytes (0 count) > 1mb: 0 bytes (0 count) Cumulative _reallocs of nil pointers by size <= 1kb: 0 bytes (0 count) 1kb to 4kb: 0 bytes (0 count) 4bk to 8kb: 0 bytes (0 count) 8bk to 16kb: 0 bytes (0 count) 16bk to 32kb: 0 bytes (0 count) 32bk to 64kb: 0 bytes (0 count) 64bk to 128kb: 0 bytes (0 count) 128kb to 256kb: 0 bytes (0 count) 256kb to 512kb: 0 bytes (0 count) 512kb to 1024kb: 0 bytes (0 count) > 1mb: 0 bytes (0 count)' _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users