In the case that memory is allocated and its known that it (almost certainly / probably) won't be used for a long time, it could be useful to tag this memory to be more aggressively moved into swap-space.
Is there some command to tell the kernel of this?
Failing that, it may be better to dump these out to temp files, but I was curious about the ability to send-to-swap (or something similar).
Of course if there is no swap-space, this would do nothing, and in that case writing temp files may be better.
madvise(base, length, MADV_COLD);ormadvise(base, length, MADV_PAGEOUT);might be the syscall you're looking for. Check the return value to see if the value was supported by the current kernel.