Re: [GENERAL] memory - Mailing list pgsql-ports

From Bruce Momjian
Subject Re: [GENERAL] memory
Date
Msg-id 199912070321.WAA19688@candle.pha.pa.us
Whole thread Raw
In response to Re: [GENERAL] memory  (Daniel Kalchev <daniel@digsys.bg>)
List pgsql-ports
> Bruce,
>
> As suggested, I wrote the following program (test.c):
>
> --- cut here ---
> #include <stdlib.h>
>
> main()
> {
>     int allocated = 0;
>     int mb = 1024 * 1024;
>
>     while (malloc(mb) != NULL) {
>         allocated ++;
>         printf ("%d MB allocated\n", allocated);
>     }
> }

OK, we use malloc for memory allocation, and the error you were getting
was from that function that does that, I think.  I am confused.  Could
it be stack space somehow?

--
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

pgsql-ports by date:

Previous
From: adam@globaladv.com
Date:
Subject: Travel Companies Reach the World
Next
From: Clemens Vonrhein
Date:
Subject: port to IRIX 6.3