in reply to Re: Inactive memory and OSX
in thread Inactive memory and OSX
It would be ideal if it were possible to "switch off" this behaviour from start of the script. For now, purging at the end will have to do:
The way I understand it, inactive memory gets returned to the system memory pool on demand. That is, as soon as something else (another process) needs it, it gets made available immediately and cheaply without any need to manually purge it.
It is only held as 'inactive' while nothing else asks for it, on the off chance (and frequently true), that you might re-run the same program and thus it makes the second (and any subsequent runs) of the program quicker.
In that respect, you can simple consider inactive memory a part of the free memory pool and your 'need to purge' is purely psychological.
I'd also have questions regarding whether running purge from inside the process that you're trying to purge will work. system starts another process, but your program won't finish until the system call returns. (I can't try it; its my brother that runs OSX and its the middle of the night where he is.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Inactive memory and OSX
by mtmcc (Hermit) on Jul 05, 2013 at 09:29 UTC | |
by BrowserUk (Patriarch) on Jul 05, 2013 at 09:51 UTC |