Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed dropbox and it has terrible memory management. It often uses 3GB out of my 4GB of RAM.

Is there any way to limit the app memory usage?

I would like to never allow more than 250 MB of RAM.

share|improve this question
How are you determining that it's using 3GB of RAM? – Hasaan Chop Mar 10 '10 at 22:35
Which version of Dropbox are you using? – sblair Mar 10 '10 at 23:01
memory usage used to be easy to manage on a Mac: Cmd-I would give you the Info pane, and you could adjust its minimum and maximum allocations – warren Apr 14 '10 at 12:49
The iStat Menus application is pretty great for watching memory, disk, CPU, etc. usage. You can also use the top command-line utility to look at active processes. – Harlan May 28 '10 at 16:42

You can try using the ulimit shell builtin to limit the resources, though you then have to launch Dropbox from the shell that you ran ulimit in, instead of from the Finder or something.

$ help ulimit
ulimit: ulimit [-SHacdefilmnpqrstuvx] [limit]
    Modify shell resource limits.

    Provides control over the resources available to the shell and processes
    it creates, on systems that allow such control.

      -S        use the `soft' resource limit
      -H        use the `hard' resource limit
      -a        all current limits are reported
      -b        the socket buffer size
      -c        the maximum size of core files created
      -d        the maximum size of a process's data segment
      -e        the maximum scheduling priority (`nice')
      -f        the maximum size of files written by the shell and its children
      -i        the maximum number of pending signals
      -l        the maximum size a process may lock into memory
      -m        the maximum resident set size
      -n        the maximum number of open file descriptors
      -p        the pipe buffer size
      -q        the maximum number of bytes in POSIX message queues
      -r        the maximum real-time scheduling priority
      -s        the maximum stack size
      -t        the maximum amount of cpu time in seconds
      -u        the maximum number of user processes
      -v        the size of virtual memory
      -x        the maximum number of file locks

    If LIMIT is given, it is the new value of the specified resource; the
    special LIMIT values `soft', `hard', and `unlimited' stand for the
    current soft limit, the current hard limit, and no limit, respectively.
    Otherwise, the current value of the specified resource is printed.  If
    no option is given, then -f is assumed.

    Values are in 1024-byte increments, except for -t, which is in seconds,
    -p, which is in increments of 512 bytes, and -u, which is an unscaled
    number of processes.

    Exit Status:
    Returns success unless an invalid option is supplied or an error occurs.

You probably want ulimit -m or ulimit -v.

share|improve this answer
This doesn't work. I did ulimit -m 200000 and ulimit -v 200000 then ran an application via /Applications/ I then watched the memory climb well over 500 MB before I killed the process. – Harlan May 28 '10 at 16:41

You should replace Dropbox by an experimental build.

share|improve this answer

You must log in to answer this question.