mmap

I want to know whether this is possile or ever been tried out.

I want to obtain a chuck of memory using mmap()

I do it so :

n = mmap(0, 8000, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);

And hold on to that memory, when a process requests for memory, some memory is assigned from this chunk.

In Linux is it possible to control where the new process gets it's memory from? Can i create a process that will only get memory from the chunk of memory i reserved?

Yes, you can allocate memory in one process and expose it to other processes. It is called shared memory. No, you cannot force another new process to use exclusively the memory you decide to give it.

All of this seems a little odd. You can cause yourself a lot of issues doing something like the above. What are you trying to accomplish, NOT what you think you should to do?

What the actual problem is that, there is an application that needs quite some amount of memory to run.

However, it does not get so much as our board is running low on memory. So we were thinking to reserve some memory and create a program that acts as a memory manager and assign that application memory when in demand. Else it will be in waiting most of the time.

If i could get a small prototype that would suffice.