Out of string space, grrrr.
Posted in 1992
Well, I'm bumping into the infamous error -4518, out of temporary string space. This is with RDS, version 4.10.UC2. Can someone who knows explain exactly - how much there is - how it is allocated - how it is deallocated - how to get more :-) [I'd try tech support, but, er, I'm interested in useful and timely answers :-)] I'm not entirely sure I trust where it says the error is, but it bombs in a function that is building a query in a string based on params passed in, then returning the string for later use in a select. I found out real quick that I'm severely limited in the length of the strings I can construct (grrr), so I know that my resulting string is less than 160 chars, and the input params are 18 and 64 chars; plus 5 "local" vars of 18 each. The relevant logic is essentially let q = "select ", v1 clipped, " from ", v2 clipped, ... I've already fought this problem when I had 'q' at 256 not 160 chars, but then it was happening constantly. What gets me (hence the questions about alloc/dealloc) is that all is well ONE time through the function that calls this query-builder, but the second time (after we've returned to the main and are starting all over again, hence any stack space should be freed) it bombs. Yet if it were malloc'd space, why should it run out so fast? (Virtual memory is definitely not lacking.) And if it's a fixed size pool, why isn't it (a) large (b) reusable and/or (c) growable. The more detailed you can answer, the better [I'm a 10 year veteran OS kernel hacker, etc.etc.]. I'd hate to have to code this function in C (especially if the only reason is some absurdly low limit to quantities of strings), and I'm not even sure if it would help -- hence the request for details on *why* this is being a problem. (Writing the whole application is ESQL/C would be a major pain, but there are times when I wonder...) Anyway, TIA... -- Andrew Burt aburt@du.edu "But if he was dying he wouldn't bother to carve "Aaaaargh", he'd just say it."