Re: Static Variables



Flash Gordon <spam@xxxxxxxxxxxxxxxxxx> writes:
Richard Heathfield wrote, On 20/02/07 09:57:
akhil.misra@xxxxxxxxx said:

where does a static variable inside a function get stored??

In random access memory, or "RAM" (or, if it's const, it might get put
into read-only memory, or "ROM").

You mean my implementation using pairs of goldfish to store each bit
(one a second the goldfish that knows the current value tells the other
goldfish to "refresh" the bit and stop it from being forgotten) is not a
conforming implementation? Damn.
[...]

Sure it's conforming. There's nothing that says that random access
memory has to be made from semiconductors rather than, say, small
fishes or tiny iron toruses. But your access is likely to be more
random than you really want it to be.

--
Keith Thompson (The_Other_Keith) kst-u@xxxxxxx <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
.



Relevant Pages

  • Re: 9 ball racking order
    ... Corwyn wrote: ... A hard disk ... Proving yet again that the term "random" in random access ... The only way that memory is truly "random" is if it is not working. ...
    (rec.sport.billiard)
  • Re: Sorting records using sort()
    ... >If the idea is to sort more data than fits in memory, ... Even though all your memory-devices may be random access the difference ... First time posters: Do this! ...
    (comp.lang.cpp)
  • Re: System memory - Quantity vs. quality?
    ... smaller amount of higher speed memory or a larger amount of slower. ... The disk didn't light up at all. ... hardware designers do logic simulation ... what happens with a program with random access patterns. ...
    (microsoft.public.windowsxp.hardware)
  • Re: OutOfMemoryException
    ... Alternatively, assign more memory to your Java program, or don't ... "growth problem", causing premature ... Random access is also "quite" fast, ... the ArrayList to allocate a capacity that is as large than ...
    (comp.lang.java.programmer)
  • Gordon Brown and the Goldfish
    ... the memory of a goldfish is about 3 seconds. ... Swim, swim. ... And the selling off of our centuries-old inflation proof, Gold ...
    (uk.politics.misc)