From: Edgar Friendly <thelema314@gmail.com>
To: Zheng Li <li@pps.jussieu.fr>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Re: Problems spawning threads
Date: Tue, 18 Dec 2007 11:40:47 -0600 [thread overview]
Message-ID: <4768061F.7080404@gmail.com> (raw)
In-Reply-To: <878x3s3pdn.fsf@pps.jussieu.fr>
Zheng Li wrote:
> Hi
>
> Edgar Friendly <thelema314@gmail.com> writes:
>> My laptop does a just fine job making and using 503 native threads with
>> 512M ram (and lots of big programs already filling that up). I don't
>> believe that their (likely beefier) benchmarking system hits a VM limit
>> mine doesn't.
> Just made a test, the upper bound of my machine is 381 threads (without
> event sync, just start threads and hold). You probably have to wrap some
> C function to set pthread's stack size to ~ PTHREAD_STACK_MIN.
>
Okay, now things get really wierd... I use a Makefile to build and
execute the test benchmark, and I run make from Emacs using tuareg's C-c
C-c macro. When I do so, I have no problems running the test - it just
takes a while to complete. But if I run the same make command from my
bash prompt inside gnome-terminal, I get the "Thread.create: Cannot
allocate memory" error... hmmm... Maybe there really is something to
this ulimit deal...
[root@iesyou shootout]# ulimit -s 1000
[root@iesyou shootout]# ./threadring.ocaml_run.opt 10000
444
[root@iesyou shootout]# ulimit -s 10000
[root@iesyou shootout]# ./threadring.ocaml_run.opt 10000
Fatal error: exception Sys_error("Thread.create: Cannot allocate memory")
I wonder what stack size gets inherited from emacs... Anyway, this
looks like confirmation of Xavier's theory. Thanks everyone.
E.
next prev parent reply other threads:[~2007-12-18 17:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-18 5:18 Edgar Friendly
2007-12-18 5:23 ` Edgar Friendly
2007-12-18 8:03 ` [Caml-list] " Michael Wohlwend
2007-12-18 10:59 ` Zheng Li
2007-12-18 15:57 ` [Caml-list] " Edgar Friendly
2007-12-18 17:05 ` Zheng Li
2007-12-18 17:40 ` Edgar Friendly [this message]
2007-12-18 16:22 ` [Caml-list] " Xavier Leroy
2007-12-18 17:04 ` Jon Harrop
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4768061F.7080404@gmail.com \
--to=thelema314@gmail.com \
--cc=caml-list@inria.fr \
--cc=li@pps.jussieu.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox