Questions tagged [file-mapping]

87 questions
50
votes
2 answers

Red Black Tree versus B Tree

I have a project in which I have to achieve fast search, insert and delete operations on data ranging from megabytes to terabytes. I had been studying data structures of late and analyzing them. Being specific, I want to introduce 3 cases and ask…
swanar
  • 635
  • 1
  • 6
  • 10
13
votes
5 answers

Loop Around File Mapping Kills Performance

I have a circular buffer which is backed with file mapped memory (the buffer is in the size range of 8GB-512GB). I am writing to (8 instances of) this memory in a sequential manner from the beginning to the end at which point it loops around back to…
ronag
  • 49,529
  • 25
  • 126
  • 221
10
votes
4 answers

IO from a mapped file vs IO using filestreams

I am working on an application which needs to deal with large amounts of data(in GBs). I don't need all the data at once at any moment of time. It is ok to section the data and work only on(and thus bring it into memory) a section at any given…
Arun
  • 3,138
  • 4
  • 30
  • 41
6
votes
0 answers

Export Wizard SQL Server Management Studio cannot locate mapping file cannot convert data types to fit Postgresql

I want to export databases from our SQL Server 2008 to our PostgreSQL server. The problem is that during the Import/Export Wizard the Wizard says that he cannot find the correct file to convert properly. (If I proceed he exports without checking…
Puddingloeffel
  • 163
  • 2
  • 9
6
votes
1 answer

C Windows API - close file handle before UnmapViewOfFile

I am wondering if for this code snippet: HANDLE fhandle = CreateFile("something.c", GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); HANDLE mapping = CreateFileMapping(fhandle, NULL, PAGE_READONLY, 0, 0,…
Mojo28
  • 335
  • 1
  • 3
  • 9
5
votes
3 answers

Mapping large files using MapViewOfFile

I have a very large file and I need to read it in small pieces and then process each piece. I'm using MapViewOfFile function to map a piece in memory, but after reading first part I can't read the second. It throws when I'm trying to map it. …
4
votes
4 answers

Creating a Key-Value Store on Disc with Concurrency in Java

I need to read a set of files and break it in to key-value pairs, and save these as a (key,list of values) for that key on disc, much like the map-reduce paradigm. Everything is on one computer though. I could for example write the different lists…
delmet
  • 1,013
  • 2
  • 9
  • 23
4
votes
1 answer

Bus error after mmap success

Context Linux 4.4.0-57-generic #78-Ubuntu SMP Fri Dec 9 23:50:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux French locale Code #include #include #include #include int main() { int fd = open(…
Aubin
  • 14,617
  • 9
  • 61
  • 84
4
votes
2 answers

How do I know the page cache size of a linux process

Now that I can know the overall cached pages of the system by /proc/meminfo, can I further know for a specific process how many page caches does it consume? My first thought is to add up all the RSSes in smaps of a process. Any more suggestions?…
Bill Randerson
  • 1,028
  • 1
  • 11
  • 29
4
votes
1 answer

How File Mapping works

I am writing a program that needs to traverse a large 40gb binary file, but I only have 16gb of physical RAM. A friend told me that I can use file mapping to allievate this problem. I understand how to create a file mapping and reading into a file…
4
votes
5 answers

CreateFileMapping, MapViewOfFile, handle leaking c++

Background: I am trying to create a memory mapped file that can be accessed by multiple processes. In the below code I only put in the code that pertains to the question I currently have to make things simpler. According to msdn I should be able to…
longlostbro
  • 528
  • 2
  • 7
  • 24
4
votes
1 answer

CreateFileMapping() for writing text whose length is unknown to file

I want to write text to file. The length of text is unknown. So I have no idea to set the size of mapped memory to be used, and I set it to 100. Then, problem appears! the string is written successfully, but the rest space of 100 bytes is filled…
Mackerel
  • 107
  • 1
  • 8
4
votes
1 answer

named shared memory between two processes

I'm trying to build a client/server in C using file mapping, it's still very early in development but i'm having some trouble understanding how file mapping works exactly. I create a file mapping of a struct on my server and put some data on it,…
Ricardo Araújo
  • 207
  • 1
  • 12
3
votes
2 answers

What part of the RAM is used by the system file cache in Windows?

According to general notions about the page cache and this answer the system file cache essentially uses all the RAM not used by any other process. This is, as far as I know, the case for the page cache in Linux. Since the notion of "free RAM" is a…
Benoit Sanchez
  • 681
  • 6
  • 21
3
votes
2 answers

Trouble passing _EXCEPTION_POINTERS * using FileMapping

I wanted to do a out-of-process exception handler and i had created a watch-dog process which does dedicated exception handling when child process raises exception. I had successfully invoked the watchdog process through events . The problem i am…
1
2 3 4 5 6