Questions tagged [file-mapping]

87 questions
0
votes
2 answers

Visual C++6 MFC MapViewOfFile returns error code 8

I have a program that is creating a map file, its able to do that call just fine, m_hMap = CreateFileMapping(m_hFile,0,dwProtect,0,m_dwMapSize,NULL);, but when the subsequent function call to MapViewOfFile(m_hMap,dwViewAccess,0,0,0), I get an error…
nagates
  • 620
  • 13
  • 40
0
votes
1 answer

Execute a mapped file on Windows

Hello fellow developers, I'm trying to map an executable binary file on Windows and then to execute the mapped file. So far, I managed the mapping using CreateFileMapping and MapViewOfFile. These functions gave me a HANDLE to the mapped file and a…
Jelly
  • 120
  • 1
  • 7
0
votes
1 answer

Communication using Shared Memory between VC++ and Qt applications

I am using FileMapping for implementing shared memory concept in a C++ windows form application and QSharedMemory in Qt application. I want to read data written by C++ form application using FileMapping technique, in Qt application using…
Anoop AR.
  • 118
  • 1
  • 12
0
votes
1 answer

OpenFileMapping issues, can't find filemap

I'm trying currently to test inter process communication by using filemaps. My first program, which i shall call the producer, doesn't error on the following code which createsa file map and writes to it, as follows: hEvent = CreateFileMapping( …
Kestami
  • 2,045
  • 3
  • 32
  • 47
-1
votes
1 answer

Need help about MapViewOfFile performance

I'm very confused by a strange issue I'm having. Consider the following code: testTimer.Start(); u64 startPositionInBytes = startPosition * sizeof(DBTransaction); u64 chunkSizeInBytes = chunkSize * sizeof(DBTransaction); u64…
-1
votes
1 answer

merge contents of two files into one file by bash command

i have two file like blow format and need to marge two file in below format (bash command) 1st row of 1st file + 1st row of 2nd file 2nd row of 1st file + 2nd row of 2nd file Example : file1 a b c d file2 1 2 3 4 expected output…
-1
votes
1 answer

getting MADV_SEQUENTIAL in freebsd to read ahead

I have a program that needs to read through many files at the same time that are filemapped. In an attempt to get the system to fetch the data before it is needed, I am calling madvise with MADV_SEQUENTIAL on each file mapping. However when it runs,…
camelccc
  • 2,847
  • 8
  • 26
  • 52
-1
votes
1 answer

How to load (or map) file part maximum size, but fit in RAM on Windows?

There is big file. I need fast sort it. I going to process the file by part, that fit in RAM, to avoid/degrees using page file (next step: merge parts). How to use max RAM? My solution: use WinApi file memory mapping, but I don't knew how to get…
slou_pc
  • 9
  • 2
-1
votes
1 answer

when should I use "Memory Manipulation Mechanisms" in WIN32 API programming?

I am studying WINAPI programming and doing bit kind of experiments by writing winapi codes. When I moved toward 'Memory Management using winapi' topic, I saw there are some 'Memory Manipulation Mechanisms' which is Virtual Memory > …
-1
votes
1 answer

Implement malloc which is backed by a disk file (dmalloc)

General malloc and mmap description malloc (or any allocation function) is supposed to allocate memory for applications. Standard glibc malloc implementation uses sbrk() system call to allocate the memory. The memory allocated to an application is…
Deepak
  • 696
  • 4
  • 14
-1
votes
1 answer

Create file using FileMapping

Good afternoon. I use FileMapping to read files. And now I need to create a file using this technology, but I don't know the size of the file. How can I use FileMappimg to create files, if there sizes are unknown?
user2996299
  • 123
  • 3
-2
votes
1 answer

PIMAGE_NT_HEADERS Showing different Values

so I am currently attempting to locally map my suspended thread when I pop my program into CFF explorer it says that the value of PIMAGE_NT_HEADERS is 00004550: however while attempting to map it by myself my value comes out to be…
brainlet
  • 41
  • 6
1 2 3 4 5
6