In MacOs, you can see free, wired, active, inactive memory status by Activity Monitor. And, you can use commandline like "purge" to purge the memory.
Then, Can I do this in iOS? I am not familiar with Mach/BSD. And, Can someone else help me?
In Mac Osx, I can convert the inactive to free using following method.
char command_line[256];
sprintf(command_line, "purge");
FILE *fp = popen(command_line, "r");
if (fp) {
pclose(fp);
}