Kernel.sytem and insufficient memory

  • Thread starter Martin aus Chemnitz
  • Start date
M

Martin aus Chemnitz

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
 
J

Jeremy Tregunna

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.
 
M

Martin aus Chemnitz

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,019
Latest member
RoxannaSta

Latest Threads

Top