Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9166429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:09:05+00:00 2026-06-17T15:09:05+00:00

Sometimes I need to deal with huge PDF files, in such case, I use

  • 0

Sometimes I need to deal with huge PDF files, in such case, I use some new operator in a loop, and this is a so huge loop so that more than 10 GB memory will be used. As we all know, I must use some WIN API functions to use hard disk. But I don’t know how to implement it. Anyone can help me?

Here is a code snippet:

CMyObject gg_data;
for(__int64 i = 0; i < up_limit(__int64); ++i)
{
   //add new data to the PDF file
   CCAry pData = new CCAry("myData");
   gg_data.AddRef(pData);
}

//after the loop, save file and free memory so that no memory leaks occur...
//Caution: the "save" is a very expensive work, it will take several hours!!!
gg_data.save();
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T15:09:07+00:00Added an answer on June 17, 2026 at 3:09 pm

    Memory mapped files are what you want.
    This maps a file into a ‘buffer’ of memory and the OS manages it for you so that you can manipulate the file as if it was a huge chunk of RAM.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sometimes I need to find some strings inside DB usually it is just host-name
Sometimes I need to make a UITableView that resembles a menu and has rows
As a C++ programmer I sometimes need deal with memory buffers using techniques from
Sometimes I need to UNREGISTER some ModelAdmins from the admin site, because I don't
In a (Java) code that I'm working on, I sometimes deal with a non
I Use MVC and sometimes need to pass the ViewBag.Message from Controller to view,
I sometimes need to see what SQL statement SubSonic generates. That works great with:
I sometimes need to use partial views in Web2Py , but I need to
I need to parse a file that contains conditional statements, sometimes nested inside one
I sometimes need a class in C++ which allocates dynamic memory. Since this can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.