Hi Friends,
I need the equivalent windows function that implements sbrk in Linux
Also
I need the equivalent windows function that implements mmap in Linux
Can you please help me out?
Thanks,
Sarma
Printable View
Hi Friends,
I need the equivalent windows function that implements sbrk in Linux
Also
I need the equivalent windows function that implements mmap in Linux
Can you please help me out?
Thanks,
Sarma
Pls explain about sbrk,mmap functionalities
sbrk: process memory allocation/deallocation is low level kernel stuff. I don't know of any equivalent of sbrk. Step into "new" in the debugger and see where it takes you. That's probably the nearest you will get to sbrk. Anyway, all processes have a virtual space of 4Gb.
mmap: Memory mapping files in windows is quite painful to use: you need to lock to access the mapped memory and unlock so that everyone else can see it. The routines you need to look at are
CreateFileMapping - for the server
OpenFileMapping - for the client
MapViewOfFile - whenever you wish to access it
UnmapViewOfFile - whenever you have finished accessing it.