[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Kernel.sytem and insufficient memory

Martin aus Chemnitz

5/18/2005 10:12:00 PM

Hi!

Today, I started to write some Ruby code. In my little script, I call
another one using system(). After extending my Ruby script, the called
program failed because of insufficient memory. I commented out some
variable assignments and it worked again. It's reproducable that the
existence of a couple of (basic) Ruby commands leads to insufficient memory.

Is this a bug or a feature? ;)
What are possible solutions?

ruby 1.8.2 (2004-12-25) [i386-mswin32]

Thanks a lot

Martin
2 Answers

Jeremy Tregunna

5/18/2005 11:14:00 PM

0


On 18-May-05, at 6:15 PM, Martin aus Chemnitz wrote:

> Hi!
>
> Today, I started to write some Ruby code. In my little script, I call
> another one using system(). After extending my Ruby script, the called
> program failed because of insufficient memory. I commented out some
> variable assignments and it worked again. It's reproducable that the
> existence of a couple of (basic) Ruby commands leads to insufficient
> memory.

Maybe you could provide an example of exactly what is failing; I cannot
reproduce this behaviour from my understanding of your question.

> Martin

--
Jeremy Tregunna
jtregunna@blurgle.ca




Martin aus Chemnitz

5/19/2005 6:43:00 AM

0

> Maybe you could provide an example of exactly what is failing; I cannot
> reproduce this behaviour from my understanding of your question.

I tried to reduce the script to an example anyone could test. After long
attempts I had to figure out that it wasn't Ruby's fault. Sorry for
accusing it.

All my script does, is assembling a command line for the program to
call. What I did not know, is that this program can only take parameters
up to 215 chars long. The Ruby lines I commented out were (later on in
the script) responsible for a difference of only a few characters. So it
appeared that everything worked without those lines and that with those
lines, the external program crashed with "Destination buffer too small
(CopyString)".

Martin