what is memory map file & when to use it RRS feed

  • Question

  • Please tell me what is memory map file and in what kind of scenario people use it to store data?

    I am working with large data which i need to store in memory  and getting out of memory exception.if i use memory map file to store my large data then can i avoid out of memory exception?

    • Edited by Sudip_inn Saturday, August 24, 2019 7:53 PM
    Saturday, August 24, 2019 7:49 PM


  • No.  When you map a file into memory, it uses up your memory space exactly like allocating from the heap.

    It's possible to map part of the file at a time, but you have to figure out whether that makes sense for you, as opposed to just reading your data from file and processing the records one by one.

    And once again, I need to suggest that you consider using a real database, which can load a few records at a time.

    Tim Roberts | Driver MVP Emeritus | Providenza & Boekelheide, Inc.

    • Marked as answer by Sudip_inn Sunday, August 25, 2019 7:18 AM
    Sunday, August 25, 2019 4:30 AM