memory-mapping

How to transfer sensitive data between processes in Windows?

I would like to transfer user name and password information from one process to another process running on the same server in Windows. What is the best approach to achieve this transfer in a secure way? One simple approach is to copy the passwords to a file and then have the other process read from a file and then delete the file once it...

Convert a pointer to an array in C++

Hi, The CreateFileMapping function returns a pointer to a memory mapped file, and I want to treat that memory mapping as an array. Here's what I basically want to do: char Array[] = (char*) CreateFileMapping(...); Except apparently I can't simply wave my arms and declare that a pointer is now an array. Do you guys have any idea how...

Retrieving the memory map of its own process in OS X 10.5/10.6

In Linux, the easiest way to look at a process' memory map is looking at /proc/PID/maps, giving something like this: 08048000-08056000 r-xp 00000000 03:0c 64593 /usr/sbin/gpm 08056000-08058000 rw-p 0000d000 03:0c 64593 /usr/sbin/gpm 08058000-0805b000 rwxp 00000000 00:00 0 40000000-40013000 r-xp 00000000 03:0c 4165 /lib/...

Does it make sense to cache data obtained from a memory mapped file?

Or it would be faster to re-read that data from mapped memory once again, since the OS might implement its own cache? The nature of data is not known in advance, it is assumed that file reads are random. ...

Basic memory and cache mapping scheme questions

Hey all I'm going to have my finals on computer architecture this tuesday and I need a little help. Can anyone please guide or teach me how to go about memory mapping schemes? Specifically direct, fully associative and N - way set associative. I researched around and had a hard time understanding what to do. So here is an example: Con...

Why does MapViewOfFile return an unusable pointer for rapidxml?

As suggested: I have a file which is larger than 2 giga. I am mapping to memory using the following function: char* ptr = (char*) MapViewOfFile( map_handle, FILE_MAP_WRITE | FILE_MAP_READ, 0, 0, 0 ); I parse ptr to rapidxml which accepts Ch* . As per the documentation from rapidxml ptr should be modifiable but since it is decl...

Why 16-bit address with 12-bit offset results in 4KB page size?

Hi guys, I'm reading the "Modern Operating System" book. And I'm confused about the "Page Size". In the book, the author says, The incoming 16-bit virtual address is split into a 4-bit page number and 12-bit offset. With 4 bits for the page number, we can have 16 pages, and with 12 bits for the offset, we can address all ...

Why does MAP_GROWSDOWN cause SIGBUS errors after upgrading to Centos 5.5?

I was upgrading the OS on one of our build from Centos 5.3 32bit to Centos 5.5 32bit. After doing the package update I rebooted, checked out a clean copy of the source, built and ran the unit tests. All unit tests which rely on our MemMap base class began to fail. The crash occurs when we attempt to set the value of the guard page aft...