I'm asking specifically about Linux, but an answer that applies to Unix in general (i.e. POSIX or similar) would be even better, obviously.
Linux uses free memory (i.e. that memory which is not yet allocated to processes) for caching filesystem metadata (and maybe other things). When processes request additional memory, these caches are shrunk to make room.
My question: Is there a method by which an application can allocate memory that serves as a cache only? That is, the allocation is made knowing that the kernel is allowed to seize control of this memory area in some way when available memory runs low and other processes' memory allocations could otherwise not be served.