Heap dimensions

Silvio a Beccara s.abeccara at email.it
Mon Jul 25 10:41:50 CEST 2005


Hi Russell,

thanks for the hints. I tried to compile and run your program, and I get a 
very similar result:

[...]
allocated 2105834625 bytes
allocated 2122416000 bytes
allocated 2138997375 bytes
./heaptest: value out of range (error #300 at 8049dbc)

so I still don't understand why I was getting the error at a lower limit. Here 
are the results for my box. The memory is the same as yours, and it is 
shared, since this is a two-cpu box:

[abeccara at baciuco 4-128]>free
             total       used       free     shared    buffers     cached
Mem:       2055276    2015180      40096          0     288120    1410364
-/+ buffers/cache:     316696    1738580
Swap:      2048216          0    2048216

(now none is free since it's running a job), and also the limits are quite 
similar:

[abeccara at baciuco 4-128]>ulimit -a
core file size        (blocks, -c) 0
data seg size         (kbytes, -d) unlimited
file size             (blocks, -f) unlimited
max locked memory     (kbytes, -l) 4
max memory size       (kbytes, -m) unlimited
open files                    (-n) 1024
pipe size          (512 bytes, -p) 8
stack size            (kbytes, -s) 10240
cpu time             (seconds, -t) unlimited
max user processes            (-u) 7168
virtual memory        (kbytes, -v) unlimited

Best regards

Silvio a Beccara


> Box here is 2 cpu's with 2gb *shared* memory.
> I got exactly what I expected:
>
> ulimit -a
>    core file size        (blocks, -c) 0
>    data seg size         (kbytes, -d) unlimited
>    file size             (blocks, -f) unlimited
>    max locked memory     (kbytes, -l) 32
>    max memory size       (kbytes, -m) unlimited
>    open files                    (-n) 1024
>    pipe size          (512 bytes, -p) 8
>    stack size            (kbytes, -s) 8192
>    cpu time             (seconds, -t) unlimited
>    max user processes            (-u) 16380
>    virtual memory        (kbytes, -v) unlimited
>
> free
>               total       used       free     shared    buffers     cached
> Mem:       2074748     228500    1846248          0      28988     170524
> -/+ buffers/cache:      28988    2045760
> Swap:            0          0          0
>
> Next, ran this simple program:
>
> program heaptest;
> var
>    i: integer;
>    buf: pointer;
>    siz: cardinal;
>
> begin
>    for i := 1 to 255 do
>    begin
>      siz := i * 255 * 255 * 255;
>      getmem( buf, siz);
>      writeln("allocated ", siz," bytes");
>      freemem( buf );
>    end;
> end.
>
> The output was:
> [..]
> allocated 1989765000 bytes
> allocated 2006346375 bytes
> allocated 2022927750 bytes
> heaptest: out of heap when allocating 2039509125 bytes (error #853 at
> 8049e61)
>
> Hope this helps
>    Russ
 

 

 --

 Email.it, the professional e-mail, gratis per te: http://www.email.it/f

 

 Sponsor:

 Telefona con TELE2. Risparmia sulle tue telefonate urbane, interurbane, internazionali e verso i cellulari

 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=3756&d=25-7




More information about the Gpc mailing list