[aplusdev] IT WORKS!

ber smith at panix.com
Tue Feb 12 10:01:09 EST 2002


Hello Sasha,

It wouldn't matter if you had billions and billions of gigabytes of 
ram.  The issue
is the amount of memory that can be addressed with a 32bit pointer.  In 
Unix,
that's 4GB max.  In practice it's much less depending on the Unix 
variant.

Here's the experiment on a 64bit system (Irix).  Notice how the address 
space
required (SZ) grows to 9GB.  You can't address 9GB in ia32 Linux.


$ /ms/dist/aplus/bin/a+_64
      A+
      Copyright (c) 1990-1999 Morgan Stanley Group Inc.
      This version is Release 4.17
      $mode ascii
      sys.getpid{}
  2670441
      $ps -lp 2670441
   F S   UID        PID       PPID  C PRI NI  P    SZ:RSS      WCHAN 
TTY     TIME CMD
   0 S  1082    2670441    2671046  0  20 20  *  1684:673   9808eb98 
pts/84  0:00 a+_64.1
      1684*1024*16 // 16k pages
  27590656
      t := beam 'large.m'
      $ps -lp 2670441
   F S   UID        PID       PPID  C PRI NI  P    SZ:RSS      WCHAN 
TTY     TIME CMD
   0 S  1082    2670441    2671046  0  20 20  * 65585:681   9808eb98 
pts/84  0:00 a+_64.1
      65585*1024*16
  1074544640
      rho t
  1046811500
      t iota '<'
  368
      $ps -lp 2670441
   F S   UID        PID       PPID  C PRI NI  P    SZ:RSS      WCHAN 
TTY     TIME CMD
   0 S  1082    2670441    2671046  0  20 20  * 65585:64574 9808eb98 
pts/84  0:12 a+_64.1
      +/t='<'
  32813900
      $ps -lp 2670441
   F S   UID        PID       PPID  C PRI NI  P    SZ:RSS      WCHAN 
TTY     TIME CMD
   0 S  1082    2670441    2671046  0  20 20  * 589873:564692 9808eb98 
pts/84  1:45 a+_64.1
      589873*1024*16
  9664479232


	ber

On Tuesday, February 12, 2002, at 06:31 AM, Alexander Skomorokhov wrote:

> Good morning,
>
>> I suspect it is because of memory.  errno 12 is:
>>
>>      12 ENOMEM Cannot allocate memory. The new process image required 
>> more
>>              memory than was allowed by the hardware or by
>> system-imposed mem-
>>              ory management constraints.  A lack of swap space is 
>> normally
>>              temporary; however, a lack of core is not.  Soft
>> limits may be
>>              increased to their corresponding hard limits.
>
> I get this error on 1GB of RAM.
>
>> You can check your user limits with "ulimit -a" but I'm inclined
>> to thing A+ is creating temporary objects and blowing out your
>> virtual address space.
> It is:
> askom at suse:~> ulimit -a
> core file size (blocks)     0
> data seg size (kbytes)      unlimited
> file size (blocks)          unlimited
> max locked memory (kbytes)  unlimited
> max memory size (kbytes)    unlimited
> open files                  1024
> pipe size (512 bytes)       8
> stack size (kbytes)         unlimited
> cpu time (seconds)          unlimited
> max user processes          8191
> virtual memory (kbytes)     unlimited
> askom at suse:~>
>
>> Run "top -d 0" while the process is executing and see if you can
>> catch the maximum SIZE.
> Everything is changing very fast there, can't read...
>
>> I could try it on a 64 bit system and see if it fails.  Why don't
>> you create a 1GB file with some method I can reproduce.
> I DID. Attached is zipped text file I played with. It's original size is
> 1Mb.
> I made 1 Gb simply
>
> cp r.txt large.txt
> cat r.txt >> large.txt
> cat r.txt >> large.txt
> ...
> /* to speed up things :-)
> cp large.txt r.txt
> /* and again
> cat r.txt >> large.txt
> cat r.txt >> large.txt
> ..
> /*when large.txt is 1Gb run John's utility
> beamOut large.txt large.m
> a+
> ..
>
> Regards,
> Sasha.
>




More information about the apluslist mailing list