Re: Limiting resources used by scripts on web server
- From: "Donal K. Fellows" <donal.k.fellows@xxxxxxxxxxxxxxxx>
- Date: Mon, 30 Jun 2008 13:49:30 +0100
Alexandre Ferrieux wrote:
[...] it turns out it is
hard because (1) Tcl_Objs are allocated globally, and not bound to a
thread/interp,
Actually, they're thread-bound (there's a per-thread memory pool).
(2) to my knowledge there is no instrumentation to keep
track of how many Tcl_Objs were created by a given thread/interp.
On a thread level, if there isn't (I'd need to check the source to see
if there is when memory debugging is turned on) then it would be easy to
add. The real problems are that all other accounting is per-interpreter
(memory is often allocated in contexts where there is no interpreter to
account it against) and it is very difficult to recover from memory
allocation failures — almost the whole of Tcl assumes that Tcl_Alloc()
never ever fails, which is true right now and also massively simplifies
a lot of code — and everything is made more complex by the fact that any
recovery strategy will almost certainly need to allocate more memory
while it runs...
Donal.
.
- Follow-Ups:
- Re: Limiting resources used by scripts on web server
- From: Alexandre Ferrieux
- Re: Limiting resources used by scripts on web server
- References:
- Limiting resources used by scripts on web server
- From: graeme.pietersz@xxxxxxxxx
- Re: Limiting resources used by scripts on web server
- From: Gerald W. Lester
- Re: Limiting resources used by scripts on web server
- From: graeme.pietersz@xxxxxxxxx
- Re: Limiting resources used by scripts on web server
- From: Alexandre Ferrieux
- Limiting resources used by scripts on web server
- Prev by Date: Re: How to read the last 100 lines from a text file
- Next by Date: Re: Limiting resources used by scripts on web server
- Previous by thread: Re: Limiting resources used by scripts on web server
- Next by thread: Re: Limiting resources used by scripts on web server
- Index(es):
Relevant Pages
|