Re: [squid-users] xmalloc and out of memory errors in messages log

From: Tay Teck Wee <wolfpacks01@dont-contact.us>
Date: Mon, 13 Oct 2003 12:03:45 +0800 (CST)

 --- Henrik Nordstrom <hno@squid-cache.org> wrote: >
On Fri, 10 Oct 2003, Tay Teck Wee wrote:
>
> > > How large is the process shortly before it dies?
> >
> > 900M
>
> And how large processes does your sustem support?

Thanks for the program. This is my output:
Max allocated memory: 2987816 KB (2917 MB)

>
> Try this small C test program:
>
> // begin test.c
> #include <stdio.h>
> #include <stdlib.h>
>
> int main(int argc, char **argv)
> {
> int size = 0;
> char *ptr;
>
> while ((ptr = malloc(1024)) != NULL) {
> size += 1;
> *ptr = 1;
> if (!(size & 0x3FF))
> printf("allocated memory: %d MB\n", size /
> 1024);
> }
> printf("Max allocated memory: %d KB (%d MB)\n",
> size, size / 1024);
> }
> // end test.c
>
>
> cc test.c
> ./a.out
>
>
> Regards
> Henrik
>

__________________________________________________
Do You Yahoo!?
A free party for the most "shiok" photo!
http://sg.yahoo.com/shiok
Received on Sun Oct 12 2003 - 22:03:47 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:20:28 MST