I don't know if I understand. It sounds like you want to the limit the total memory allocated during the dynamic extent of the function called. I don't know of functionality that does that.

The limit is on the total amount of memory reachable only from within the function. Without knowing more, I would recommend to change the function from modifying global data structures directly, to returning whatever data it is generating. That way the limit will apply.

Does that make sense?

Thanks,
Dave

On 09/09/2013 02:01 PM, J. Ian Johnson wrote:
Ah, that would probably be the problem. Without having to modify too much code, 
would the proper way to call a function entirely within the sandbox be to use 
dynamic-require in the thunk, rather than require in the module using 
call-with-limits?
-Ian
----- Original Message -----
From: "David Vanderson" <david.vander...@gmail.com>
To: "J. Ian Johnson" <i...@ccs.neu.edu>
Cc: "dev" <dev@racket-lang.org>
Sent: Monday, September 9, 2013 1:50:13 PM GMT -05:00 US/Canada Eastern
Subject: Re: [racket-dev] call-with-limits memory bound isn't actually bounding 
memory usage

Just to make sure, is the memory being allocated reachable from outside
the sandbox?

http://www.cs.utah.edu/plt/publications/ismm04-addendum.txt

On 09/09/2013 01:29 PM, J. Ian Johnson wrote:
I don't use the gui framework at all. This is all just pounding on global 
hash-tables and vectors. Or are you talking about the sandbox queuing up 
callbacks?
-Ian
----- Original Message -----
From: "Robby Findler" <ro...@eecs.northwestern.edu>
To: "J. Ian Johnson" <i...@ccs.neu.edu>
Cc: "dev" <dev@racket-lang.org>
Sent: Monday, September 9, 2013 1:16:51 PM GMT -05:00 US/Canada Eastern
Subject: Re: [racket-dev] call-with-limits memory bound isn't actually bounding 
memory usage


The framework will, sometimes do stuff that queues callbacks and, depending on 
how you've set up other things, the code running there might escape from the 
limit. Did you try putting the eventspace under the limit too?

Robby



On Mon, Sep 9, 2013 at 10:54 AM, J. Ian Johnson < i...@ccs.neu.edu > wrote:


I'm running my analysis benchmarks in the context of (with-limits (* 30 60) 2048 
<run-analysis>), and it's been good at killing the process when the run should 
time out, but now I have an instantiation of the framework that just gobbles up 15GiB 
of memory without getting killed. What might be going on here?

Running 5.90.0.9
-Ian
_________________________
Racket Developers list:
http://lists.racket-lang.org/dev

_________________________
    Racket Developers list:
    http://lists.racket-lang.org/dev



_________________________
 Racket Developers list:
 http://lists.racket-lang.org/dev

Reply via email to