[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: classics Re: More than 2, but less than 3 GiB per process memory?



On Mon, Sep 26, 2005 at 11:38:07AM -0700, Alvin Oga wrote:
> 
> 
> On Mon, 26 Sep 2005, Hendrik Boom wrote:
> 
> > > Here is the very simple test program.
> > > 
> > > #include <stdio.h>
> > > #include <stdlib.h>
> > > #include <malloc.h>
> > > 
> > > const int amountK = 1024;
> > > 
> > > int main()
> > > {
> > >   unsigned long count = 0;
> > > 
> > >   for (;;)                      /* loop forever */
> > >     {
> > >       char *p = malloc(amountK*1024);
> > >       printf("%08lu 0x%lx\n",count++,(unsigned long)p);
> > > 
> > >       if (p == 0)
> > >         {
> > >           printf("Out of memory at %ld M\n",count / (1024 / amountK));
> > >           exit(0);
> > >         }
> > >     }
> > >   return 0;
> > > }
> 
> ain't that a classic .. all software and hardware an middleware
> folks should be able to write and rewite that in gazillion languages
> ( each language that shows up on your resume )
> 
> :-)

Of course we should all be able to do this.  What's interesting, though,
is that test programs that don't seem to be significantly different are
giving different results...  Is it the program? is it the system?
Is it something else?  We won't track that down without exchanging the test code.

-- hendrik



Reply to: