Python Forum
Dealing with strings thru mmap in Python
Thread Rating:
  • 2 Vote(s) - 2.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dealing with strings thru mmap in Python
#2
I just read about mmap. If you set length to 0, it means the whole file will be read and stored into the mmap object. You are saying that the file can be more than 10GB. This will take time, the memory could be not enough. You have to read it in chunks. Also, it is said that you cannot create zero length mapping on Windows system. One more thing... Are you running this on x86 PC? The address space is 2**32 which is around 4GB. You can't map more than that.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply


Messages In This Thread
RE: Dealing with strings thru mmap in Python - by wavic - Feb-27-2017, 09:39 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Excel from SAP - dealing with formats and VBA MasterOfDestr 7 713 Feb-25-2024, 12:23 PM
Last Post: Pedroski55
  Trying to understand strings and lists of strings Konstantin23 2 833 Aug-06-2023, 11:42 AM
Last Post: deanhystad
  UnicodeEncodeError - Dealing with Japanese Characters fioranosnake 2 2,546 Jul-07-2022, 08:43 PM
Last Post: fioranosnake
  Splitting strings in list of strings jesse68 3 1,831 Mar-02-2022, 05:15 PM
Last Post: DeaD_EyE
  Dealing with duplicated data in a CSV file bts001 10 11,767 Sep-06-2021, 12:11 AM
Last Post: SamHobbs
  Dealing with a .json nightmare... ideas? t4keheart 10 4,483 Jan-28-2020, 10:12 PM
Last Post: t4keheart
  Random access binary files with mmap - drastically slows with big files danart 1 3,999 Jun-17-2019, 10:45 AM
Last Post: danart
  Finding multiple strings between the two same strings Slither 1 2,559 Jun-05-2019, 09:02 PM
Last Post: Yoriz
  Dealing with Exponential data parthi1705 11 9,932 May-30-2019, 10:16 AM
Last Post: buran
  Python: if 'X' in 'Y' but with two similar strings as 'X' DreamingInsanity 6 3,912 Feb-01-2019, 01:28 PM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020