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 8100875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:51:14+00:00 2026-06-05T22:51:14+00:00

I am trying to 0write the RAM on an 8Gb Windows 7 64-bit machine.

  • 0

I am trying to 0write the RAM on an 8Gb Windows 7 64-bit machine.

int main(int argc, char *argv[])
{
    for (__int64* i; ; i = new __int64(0))
        continue;

    return 0;
}

After it takes up roughly 2-3gigs it throws an exception: Microsoft C++ exception: std::bad_alloc at memory location 0x0039f634. I can tell there is still plenty of RAM in the task manager though. I have tried using Visual Studio 2010 and Qt Creator.

Thrown exception breaks in mlock.c:

void __cdecl _unlock (
        int locknum
        )
{
        /*
         * leave the critical section.
         */
        LeaveCriticalSection( _locktable[locknum].lock );
}

Any ideas? I want it to write all inactive RAM with 0.

  • 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-05T22:51:15+00:00Added an answer on June 5, 2026 at 10:51 pm

    Compile as x64 not win32 in build options

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

Sidebar

Related Questions

Trying to install rattle on a windows server 2008 R2 64bit machine, using 64-bit
Trying to programmatically add options to a SELECT drop down in IE Windows Mobile.
Trying to write a windows speech recognition macro. Written using XML and scripting language
Trying to merge 8 pre-sorted arrays. I'm fairly new to C, but this is
#include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <string.h> #include <unistd.h> int main
Trying to create an array of structs (new to C), but I am getting
I've run into a bit of a stumper while trying to get a shell
Trying to setup an SSH server on Windows Server 2003. What are some good
Trying to follow someone on Twitter using new iOS 5 API, getting 406 return
Trying to comply with StackOverflow's suggestion of asking a question, not creating a discussion,

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.