Re: help with huge memory consumption??
- From: Robert Redelmeier <redelm@xxxxxxxxxxxxxxx>
- Date: Fri, 02 Mar 2007 12:20:29 GMT
Bin Chen <binary.chen@xxxxxxxxx> wrote in part:
It is caused by pthread_create, I wrote a simple program and notice
the output the same of you, I don't know whether is it a bug:
[EXTRACT] for (i = 0;i < 1024;i ++)
if (pthread_create(&my_thread, NULL, &thread_proc, NULL) != 0)
The VmData increasing very fast, after a while:
VmData: 123108 kB
Or 120 kB per thread. A little fat (4 kB is minimum AFAIK) but I don't
know how much printf() uses [stomps].
Measuring memory usage is tricky due to Copy-on-Write page sharing.
Simple memory tools neglect multiple mappings and overcount horribly.
-- Robert
.
- Follow-Ups:
- Re: help with huge memory consumption??
- From: Bin Chen
- Re: help with huge memory consumption??
- References:
- help with huge memory consumption??
- From: Dan Miller
- Re: help with huge memory consumption??
- From: Bin Chen
- Re: help with huge memory consumption??
- From: Dan Miller
- Re: help with huge memory consumption??
- From: Bin Chen
- help with huge memory consumption??
- Prev by Date: Porting linux 2.4 on a new arm platform
- Next by Date: Re: Exact mechanics of a system call
- Previous by thread: Re: help with huge memory consumption??
- Next by thread: Re: help with huge memory consumption??
- Index(es):