Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Reading larg File Issue

Reading larg File Issue

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
6 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    VC_RYK
    wrote on last edited by
    #1

    Hi Experts I am reading a 7GB File line by line and i need to write some of it's contantants into two files of 9MB and 6MB in a function, for reading and writing i am using a while loop,but my application is not writing the complete OUT-PUT Files. it seems my application is not able to read the complete In-Put File. My System has only 256MB of RAM and hardly 8 GB Free space in my Hard disk. so can anybody tell me what could be the reason? Thanks in advance RYK

    J D J 3 Replies Last reply
    0
    • V VC_RYK

      Hi Experts I am reading a 7GB File line by line and i need to write some of it's contantants into two files of 9MB and 6MB in a function, for reading and writing i am using a while loop,but my application is not writing the complete OUT-PUT Files. it seems my application is not able to read the complete In-Put File. My System has only 256MB of RAM and hardly 8 GB Free space in my Hard disk. so can anybody tell me what could be the reason? Thanks in advance RYK

      J Offline
      J Offline
      Joseph Marzbani
      wrote on last edited by
      #2

      Take a look here

      Thank you masters!

      V J 2 Replies Last reply
      0
      • J Joseph Marzbani

        Take a look here

        Thank you masters!

        V Offline
        V Offline
        VC_RYK
        wrote on last edited by
        #3

        But Dear i m not using MFC or SDK

        1 Reply Last reply
        0
        • V VC_RYK

          Hi Experts I am reading a 7GB File line by line and i need to write some of it's contantants into two files of 9MB and 6MB in a function, for reading and writing i am using a while loop,but my application is not writing the complete OUT-PUT Files. it seems my application is not able to read the complete In-Put File. My System has only 256MB of RAM and hardly 8 GB Free space in my Hard disk. so can anybody tell me what could be the reason? Thanks in advance RYK

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          VC_RYK wrote:

          it seems my application is not able to read the complete In-Put File. My System has only 256MB of RAM and hardly 8 GB Free space in my Hard disk. so can anybody tell me what could be the reason?

          Are you storing anything other than the current line? If not, I can't imagine RAM or disk space having any relevancy. Can you provide a code snippet that exhibits the problem?

          "Love people and use things, not love things and use people." - Unknown

          "The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch

          1 Reply Last reply
          0
          • J Joseph Marzbani

            Take a look here

            Thank you masters!

            J Offline
            J Offline
            James R Twine
            wrote on last edited by
            #5

            You are suggesting that he memory map a file... a file that is more than twice his available address space...?    Peace!    N.B. While we do have a 4GB address space on Win32, only 2-3GB of it can be considered available, and even that takes some doing...

            -=- James
            Please rate this message - let me know if I helped or not! * * * If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
            Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
            See DeleteFXPFiles

            1 Reply Last reply
            0
            • V VC_RYK

              Hi Experts I am reading a 7GB File line by line and i need to write some of it's contantants into two files of 9MB and 6MB in a function, for reading and writing i am using a while loop,but my application is not writing the complete OUT-PUT Files. it seems my application is not able to read the complete In-Put File. My System has only 256MB of RAM and hardly 8 GB Free space in my Hard disk. so can anybody tell me what could be the reason? Thanks in advance RYK

              J Offline
              J Offline
              Joe Woodbury
              wrote on last edited by
              #6

              I vaguely recall that ifstream doesn't work on files over 2GB. You could try the regular CRT buffered IO calls.

              Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups