Is it possible to allocate big chunk (512Mb-1Gb with 4Gb installed) of real memory without dropping it to swap?
My final intention is to free system memory: os x has a problem when free memory is near 0 — it doesn't try hard to put unused memory to swap and everything becomes very slow trying to get memory. So, I decided that if some process grabs some memory (I grab 1/8 to 1/4 of total system memory) by force, and than frees it, than system will become responsible again.
I wrote little ruby script which created and filled memory disk (hdiutil
is the only way I found to grab real memory using external utils) and now I decided to rewrite it using just C.