logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

[ruby-dev:28810] Re: GC problem (?) in 1.8: msg#00134

lang.ruby.devel

Subject: [ruby-dev:28810] Re: GC problem (?) in 1.8

In article <4499C5D9.8090200@xxxxxxxxxxx>,
URABE Shyouhei <root@xxxxxxxxxxx> writes:

> どうやらおかしいと思ったこの値はRLIM_INFINITYのようです。というわけで、
> 問題点は「setrlimit(2)に RLIMIT_INFINITYを渡すと、なんかへんな変換がか
> かってしまうように見える」という点ですね。べつにRuby固有の問題というわけ
> でもなさそうです。以下のようにpythonにも同様の問題があることが観測できます。

つい OpenDarwin のソースを眺めてしまったところ、

src/xnu/bsd/kern/kern_resource.c に

case RLIMIT_NOFILE:
/*
* Only root can set the maxfiles limits, as it is systemwide
resource
*/
if ( is_suser() ) {
if (limp->rlim_cur > maxfiles)
limp->rlim_cur = maxfiles;
if (limp->rlim_max > maxfiles)
limp->rlim_max = maxfiles;
}
else {
if (limp->rlim_cur > maxfilesperproc)
limp->rlim_cur = maxfilesperproc;
if (limp->rlim_max > maxfilesperproc)
limp->rlim_max = maxfilesperproc;
}
break;

というようなコードがあり、maxfilesperproc で検索すると
http://lists.apple.com/archives/macos-x-server/2004/May/msg01103.html
http://discus-hamburg.cocolog-nifty.com/mac_de_oracle/2005/05/panther_de_orac_dc5e.html
とかの sysctl -a の結果中に
kern.maxfilesperproc = 10240
というのが見られます。

>>>> f = resource.RLIMIT_NOFILE
>>>> a = resource.getrlimit(f)
>>>> print a
> (256L, 9223372036854775807L)
>>>> resource.setrlimit(f, (0, a[1]))
>>>> b = resource.getrlimit(f)
>>>> print b
> (0L, 10240L)

ここの 10240 と関係あったりしないでしょうか。
--
[田中 哲][たなか あきら][Tanaka Akira]




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
qnx.openqnx.dev...    gcc.libstdc++.c...    solaris.opensol...    information-ret...    misc.misterhous...    web.catalyst.ge...    apache.webservi...    redhat.release....    hardware.lirc/2...    kernel.autofs/2...    technology.sust...    linux.vdr/2003-...    editors.lyx.gen...    org.user-groups...    netbsd.devel.pk...    xdg.devel/2004-...    version-control...    jakarta.slide.d...    debian.packages...    creativecommons...    ports.ppc.embed...    bug-tracking.bu...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation