v4Re: Long start-up time of a program with include std/

new topic     » goto parent     » topic index » view thread      » older message » newer message
AndySerpa said...

First, the memory leaks. I've got an "eval" library that evaluates string expressions, i.e. the string "2+2" will return 4, but it can also do Euphoric stuff and return sequences so it isn't only for math. I've had this library back to Eu 2.5 or so, I use it a lot. I noticed in the newer versions of Eu it causes memory leaks, but only when returning sequence values. As you can imagine, a string eval library uses indirect calls by routine_id quite a bit. I suspect that's where whatever leak is occuring is occuring, something to do with indirect calls (which could be nested several levels) where sequence values are involved. I have gone over it with a fine-tooth comb and am fairly confident the library is sound and the problem is within Eu. It really has to be since it is a pure Eu library with no low-level routines, it has no globals that could just be getting bigger and if it crashes it usually hangs instead of a proper Eu crash.

Is the library posted somewhere? If not, would you mind sending it to me? Once I can reproduce the leaks, I should be able to fix the memory leaks.

AndySerpa said...

Anyway, I've got a few programs that rely heavily on those routines and I so I just live with the memory leaks. But they need to process a ton of data so instead of making a big loop I end up restarting the program a lot to "reset" the memory problems. Since this is a Windows console program, it is constantly popping up a new console (I usually just run with the normal interpreter) with its auto-restart of itself, which gets in the way of whatever else I'm doing when I really want it to be in the background. So to avoid this, I have sometimes open a console first, and then run it from the prompt with the console interpreter to keep all the text output confined to the one window, and then when it restarts itself it still remains in that same console. So...what happens when it finishes (even if you just run it once) with one of these leaky programs where it goes back to the prompt is that the prompt is corrupted, I can't type properly in it anymore or it ignores letters, for instance if I type "dir" it will say "ir" not a command or something like that. That's what I mean about a corrupted console.

That's very strange. I have no idea what might be causing that.

AndySerpa said...

And what's with the VMs and super-long start times on newer Eu's anyway? There is definitely something gone wrong. I've been living with these problems for at least a year so I've forgotten some of the details, just hoping you'll figure it out at some point. I can't remember if the first version to do that was 4.0.3 or 4.0.2. I can check. For a while I kept the older version on my VMs so they would go fast, but eventually it was becoming problematic for them not to be synced up with my main machine, so now I bind the programs from the main machine and copy them to the VMs to run. (Bound programs start right up.)

That's very strange, too.

Matt

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu