Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucsd!hub!mango!erbo From: erbo@mango.ucsb.edu (Eric J. Bowersox) Newsgroups: comp.databases Subject: dBASE IV -- Insufficient memory Summary: any garbage collection? Keywords: memory overflow, garbage collection Message-ID: <2294@hub.UUCP> Date: 1 Sep 89 04:17:08 GMT Sender: news@hub.UUCP Reply-To: erbo@mango.UUCP (Eric J. Bowersox) Followup-To: comp.databases Organization: My Refrigerator is a Sun 3/140 Lines: 47 I am (still) writing a large application under dBASE IV at work, designed to handle the tracking of expenses. Just this evening, as I was entering test data into the recently-coded system for the generation, printing, and reporting of purchase orders, I got the infamous "Insufficient memory" error. (What's nasty about that is that even my program's error handlers wouldn't function; dBASE had to handle all the work itself.) Now, as I was in the process of halting both my program and dBASE, I thought of a possible problem: Since my application shuttles a lot of string data between the databases and memory variables, perhaps old copies of this string data were being kept around in memory, as in some versions of BASIC. What I mean by this is, if you executed the following two state- ments: str_var = "CAT" str_var = "DOG" that the string "CAT" would not _really_ be eliminated from memory, but kept hanging around someplace, even though no other character variable actually referenced it. Now, what I want to know is: 1) How accurate am I? Does dBASE really do it this way? Or is it just my program's fault that it uses so much memory? (I know it would be _REAL_ easy to assume the latter, but that would mean I'd have to redo a lot of this module, which is most definitely NOT what my supervisors want to hear right now ... :-) ... and besides, it'll only get worse in the future.) 2) If, by some miracle, I _am_ correct, is there any way of reclaiming or "garbage-collecting" that unused space, that my program could use periodically so it doesn't run out of room? (Those versions of BASIC I mentioned earlier would do it if you asked for how much memory was left, sometimes...would calling MEMORY(0) do the same thing under dBASE IV? If so, it wasn't in the manual.) Sorry if this is a bit long-winded, but I'm really up to my keister in this project, and I just have to find some sort of answer, even if the answer means I'm SOL, as it were. Perhaps Alastair, who gave me such a thorough answer before, would condescend to reply :-). Please reply by e-mail, or post if you think it's of general enough int- erest, and, as always, send all your flames to /dev/null. Thanks! | Disclaimer: "Disclaimer?! I don't even KNOW her!!" -- M. Coohill | | * Eric J. Bowersox (ERBO) * LIVE! from Isla Vista, California! | | erbo@cornu.ucsb.edu ...!{ucbvax,ucsd}!ucsbcsl!cornu!erbo | | Brain fried error reading drive C -- Abort, Retry, Ignore, Fail? |