Re: ubuntu jaunty seized up



Smoot Carl-Mitchell wrote:
#! /usr/bin/perl -w

# Array grows without bound (slowly)

my @x = ();

my $i = 0;

while (1) {
sleep 1;
$x[$i] = $i;
}

Nice explanation, but I think you need to increase the index:
$x[$i++] = $i;
or something.

--
+---------------------------------+-------------------+
| Carl Friis-Hansen | Fiskeryd Nybygget |
| http://computingconfidence.com/ | 341 91 Ljungby |
| Phone: +46 (0)372 15033 | Sweden |
+---------------------------------+-------------------+


--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users



Relevant Pages

  • Re: Misunderstanding Bateson
    ... the dormitive explanation actually falsifies the ... >>a generality that opium contains a dormitive principle, ... > to put someone to sleep". ... render the use of dormitive principle in a definition legitimate. ...
    (sci.math)
  • Misunderstanding Bateson
    ... >identifying in which fraction the so-called dormitive principle ... the dormitive explanation actually falsifies the ... to put someone to sleep". ... just as well by "morphine puts people to sleep". ...
    (sci.math)
  • Re: K&R2 Secition 5.9 - major blunders
    ... Each element of b doesn't point to a 20 element array of int. ... This mistake is crucial because ... my explanation is really the qualities of something else: ... > The use of the array of pointers is to store the strings. ...
    (comp.lang.c)
  • Re: K&R2 Secition 5.9 - major blunders
    ... Each element of b doesn't point to a 20 element array of int. ... This mistake is crucial because ... my explanation is really the qualities of something else: ... > The use of the array of pointers is to store the strings. ...
    (comp.lang.c)
  • Re: How to define a pointer to multiple-subscripted arrays
    ... Could you please kindly give me a explanation? ... Is it an array which contain the the ... You can declare a variables of this type ... an array of ints, but that it is a big blob of ints and that it can ...
    (comp.lang.c)