Hi I need a simple cocoa function for mac OS that will work with sandboxing to free unused system memory.
A few different apps on the mac app store do this already and when they "clean" the system memory I noticed the system memory usage gets completely filled up before the cleaning brings to the total memory to below what it was previously. I suspect this is done by using malloc to allocate random data into all the available memory and then subsequently free it, but haven't been able to get this working myself.
Keep the project simple (just a button) and provide code which works. Do not use the internal "purge" command with NSTask. Thanks.