title: Allocating specific address in Linux
body: <p>I would like to allocate a memory in Linux in process at a specific address.
  Actually I would like to do something like :
  I will have number of process. 
  Each process will call an initialization function in a library (written by me) which will allocate some memory in address space of the process (which will store process related information). This will be done by each process </p>
  
  <p>Once this memory is allocated, latter the program will call other function in the library. Now these function would like to access the memory allocated (containing process related information) by the first function. </p>
  
  <p>The problem is that i cannot store the address of the memory allocated in the process address space in library (not even in static pointer as there are number of process) and i don't even want user program to store that address. I just don't want user program to know that there is memory allocated by library in their address space. Library function will be abstraction  for them and they have to just use them. </p>
  
  <p>Is it possible to to over come this problem. 
  I was thinking like, whenever any process calls initialization function of library which allocates memory , the memory  always gets allocated at same address(say 10000) in all the process irrespective of all other things .</p>
  
  <p>So that any library function which wants to access that memory can easily do by :
  <code>char *p=10000;</code></p>
  
  <p>and then access, which will be access into the address space of the process which called the library function.</p>