Re: C program question and os limitation?

From: Artie Gold (artiegold_at_austin.rr.com)
Date: 07/28/03


Date: Mon, 28 Jul 2003 02:50:45 GMT

kishuri wrote:
> Hi All,
>
> I wrote simple program to print "Hi how are you" 100,000 times and
> compiled on Redhat Linux 9.0
>
> test.c
>
> main()
> {
> printf("Hi How are you");
> .
> .
> .
> /*Repeated printf for more one hundread thousand times */
> }
>
> then
>
> did #make test
> cc test.c -o test
>
> this command did NOT exit for more than half hour, later I did
> control-c to exit.
>
>
> Please tell me why I can't compile this long code?, what would be the
> best approach other than splitting the code.
>
> I would appreciate your answer talking in terms of OS limitations,
> compiler and language standards. Please don't suggest to optimize code
> using loops which I am very much aware.
>
>
How much (physical) memory do you have on your machine? I would suspect
you're in `swapping hell'.
It has nothing directly to do with any OS limitations.

HTH,
--ag

[Technically, your question is barely appropriate for this newsgroup;
news:comp.os.linux.development.system really concerns itself with kernel
and kernel-related issues.]

-- 
Artie Gold -- Austin, Texas


Relevant Pages

  • Re: My COBDATA problem
    ... Here is an extract from my COBDATA download. ... Does such compile under Fujitsu ... EXIT PERFORM only appears once in COBDATA. ... from select input-file assign to 'c:\cobdata.in' ...
    (comp.lang.cobol)
  • Re: LEAVE
    ... If definitions were nestable I could have DO do:NONAME and compile ... the xt into the outside definition, and then LEAVE could do EXIT. ...
    (comp.lang.forth)
  • Re: Thank You -- Thomas J. Gritzan
    ... void main ... long *buffer; ... exit(1); ... Someone did not even take the effort to compile their own example!! ...
    (comp.lang.c)
  • SUMMARY: Complilng VPNC
    ... will be overwritten by vpnc # as long as the above mark is intact" ... I'm trying to connect an Solaris 10 x86 system to a Cisco VPN. ... Has someone gotten this beast to compile or should I just go with openvpn? ...
    (SunManagers)
  • Re: Class Termination Woes
    ... >> compile, save everything, exit the ... But one only has to get bitten by a hung program once or twice before ... I generally always save myself before I exit. ... opens the IDE up again. ...
    (microsoft.public.vb.general.discussion)