|
-
May 30th, 2002, 05:46 AM
#1
Memory Management functions
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
-
May 31st, 2002, 01:27 AM
#2
Pls explain about sbrk,mmap functionalities
-
June 25th, 2002, 12:49 PM
#3
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.
Succinct is verbose for terse
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|