Re: [racket] Profiling memory use

2014-02-13 Thread Robby Findler
There is the sgc collector and there is the --enable-backtrace option to the 3m (default) collector. They can require some work to use, tho. They give you more information from dump-memory-stats, I believe (not sure exactly the status of sgc, tho). Do you find tactical (collect-garbage) calls to a

Re: [racket] Profiling memory use

2014-02-13 Thread Daniel Prager
Makes sense. So -- correct me if I'm wrong ;-) -- my main choices are to use a Custodian to impose a hard memory limit, and/or throw in tactical (collect-garbage)'s to help keep usage down. In terms of profiling where the memory is going, are there any sharper tools than (current-memory-in-use)?

Re: [racket] Profiling memory use

2014-02-13 Thread Daniel Prager
Thanks Robby Can the limit be imposed programmatically, for use from the command-line? Thanks Dan On Fri, Feb 14, 2014 at 9:13 AM, Robby Findler wrote: > current-memory-use is counting all of DrRacket's memory and the user > program memory. The limit, however, includes only the user program'

Re: [racket] Profiling memory use

2014-02-13 Thread Robby Findler
Yes. DrRacket does it. You'd have to use lower-level operations, tho (setting up a custodian with a limit before starting the program you want limited). Robby On Thu, Feb 13, 2014 at 4:22 PM, Daniel Prager wrote: > Thanks Robby > > Can the limit be imposed programmatically, for use from the com

Re: [racket] Profiling memory use

2014-02-13 Thread Robby Findler
current-memory-use is counting all of DrRacket's memory and the user program memory. The limit, however, includes only the user program's memory. Robby On Thu, Feb 13, 2014 at 4:05 PM, Daniel Prager wrote: > Apropos: > > I was wondering why I couldn't limit memory in a Racket program directly >

Re: [racket] Profiling memory use

2014-02-13 Thread Daniel Prager
Apropos: I was wondering why I couldn't limit memory in a Racket program directly -- for running from the command-line -- as distinct from in Dr Racket, but the following transcript shed doubts on Dr Racket: Welcome to DrRacket, version 5.3.6 [3m]. Language: racket; memory limit: *256 MB*. > (/