Limit on resource IDs? (slightly OT)
| From: | J Smith | Date: | Tue, 23 Oct 2001 21:33:27 +0000 |
| Subject: | Limit on resource IDs? (slightly OT) | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-68881@lists.php.net to get a copy of this message | ||
Just wondering if there's a limit on the number of resource IDs available
to PHP. That is, if I had a console script that was constantly allocating
and deallocating resources (say, socket file descriptors and socket
objects, for instance), will there be a point when the PHP just can't
create any more resources? These resources won't be used concurrently, of
course, since they're constantly being built and then destroyed, but will
there be a point, say if the script was running constantly for a few days,
where PHP will just refuse to allow any more resource IDs? Or will the
resource IDs eventually wrap around once they hit a boundary, say 32767,
wrapping around to -32767 or 1?
I'm just curious because I have a small experiment going on here involving
a streaming server written in PHP that uses the sockets extension and is
constantly creating and destroying sockets, which use resource IDs.
I thought about posting to php.general, but this seems to be a bit deeper
than the usual fare I see there. I suppose I could look at the PHP/Zend
source, but if anybody knows this off-hand, it would make my life easier.
Thx.
J