I am focusing on a Linux kernel project and that i need to find away out to allocate Virtual Memory without allocating Physical Memory. For instance basically make use of this :

char* buffer = my_virtual_mem_malloc(sizeof(char) * 512);

my_virtual_mem_malloc is really a new SYSCALL implemented by my kernel module. All data written about this buffer is filled on file or on other server by utilizing socket (this is not on Physical Memory). To complete this task, i have to request Virtual Memory and obtain access to the vm_area_struct structure to redefine vm_operations struct.

Have you got any ideas relating to this ?


This isn't architecturally possible. You may create vm areas which have a writeback routine that copies data somewhere, but at some level, you have to allocate physical pages to become written to.

If you are okay with this, you can just write a FUSE driver, mount it somewhere, and mmap personal files from this. If you are not, then you will need to just write(), because redirecting creates without allocating an actual page whatsoever isn't based on the x86, at the minimum.