christopherobin/php-spidermonkey — Issue #2: Configure Script Memory Usage (and potentially execution time)
Author: robbiehudson
Created: 2011-10-18 11:56:21+00:00
State: open

It'd be great to be able to configure the amount of memory that can be used by a script.

I believe this is currently set using PHP_JSRUNTIME_GC_MEMORY_THRESHOLD. It'd be great to expose this through the context interface in PHP.

Also, would it be possible to implement a max execution time on a script? I looked at the Python SpiderMonkey source and it looks possible using callbacks. It's also exposed in a nice way through their API.

Thanks,

Rob