>From: Harry Fuecks <hfuecks@xxxxxxxxx> > In this case the error message was coming from the handler [...] Just curious how you know this. Can you tell that the message occurred when creating the instructions and before catting the strings together? > A more accurate approach would be to check memory usage a number of > times during parsing. PHP provides the memory_get_usage() function [...] According to php.net, this function returns the "amount of memory allocated to PHP." That could be just how much memory has been unlinked from the global pool -- which it does in chunks -- not necessarily how much memory the script is actually consuming. PHP likely returns chunks to the global pool after each page request, so you could use this number as an upper bound on memory used, but it is going to be a very course number. The number we care about is not likely a number PHP is tracking -- how much memory is actually in use by the script. Tracking this number is a bit of work. I realize that you're exploring means for self-monitoring memory usage. I'd like to do peak capacity tests for a given amount of memory allocated to PHP via the PHP configuration. I'd do them before and after making a proposed change. I'll look at instruction allocation, but I know a big benefit is available if we change the way strings are allocated. ~joe -- DokuWiki mailing list - more info at http://wiki.splitbrain.org/wiki:mailinglist