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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Is possible to allocate strictly physical mem.(RAM) instead of virtual (page file)

Is possible to allocate strictly physical mem.(RAM) instead of virtual (page file)

Scheduled Pinned Locked Moved C / C++ / MFC
10 Posts 6 Posters 1 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.
  • M Offline
    M Offline
    marcelse
    wrote on last edited by
    #1

    Purpose is to develop secure application, which will store sensitive data only in RAM, preventing sensitive data to be written on hard drive. Turning off the computer will erase data stored in RAM. THANKS A LOT

    marcelse

    J N S 3 Replies Last reply
    0
    • M marcelse

      Purpose is to develop secure application, which will store sensitive data only in RAM, preventing sensitive data to be written on hard drive. Turning off the computer will erase data stored in RAM. THANKS A LOT

      marcelse

      J Offline
      J Offline
      John R Shaw
      wrote on last edited by
      #2

      I do not know about managed code, but in unmanaged code ‘new’ and ‘malloc’ would not normally allocate virtual memory, although that may have changed. Dig through the docs and code to find out.

      INTP "Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra

      M S 2 Replies Last reply
      0
      • J John R Shaw

        I do not know about managed code, but in unmanaged code ‘new’ and ‘malloc’ would not normally allocate virtual memory, although that may have changed. Dig through the docs and code to find out.

        INTP "Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra

        M Offline
        M Offline
        marcelse
        wrote on last edited by
        #3

        Thanks for your reply John, I have read a lot of documentation, but only info I got is that operation system will decide what memmory will give to application, physical or virtual, but I have to be 100% sure that sensitive data were not written on HDD.

        marcelse

        J R 2 Replies Last reply
        0
        • M marcelse

          Thanks for your reply John, I have read a lot of documentation, but only info I got is that operation system will decide what memmory will give to application, physical or virtual, but I have to be 100% sure that sensitive data were not written on HDD.

          marcelse

          J Offline
          J Offline
          John R Shaw
          wrote on last edited by
          #4

          All I know is that ‘malloc’ use to only allocate memory from the heap and MS’s older version of ‘new’ use to get the actual memory by calling ‘malloc’ before calling the C++ constructor. MS’s newest OS may not work that way any more, but testing it by allocating really huge amounts of memory may give you the answer. May be you should check if ‘Jeffrey Rickter’ has written a new book that covers that, or may be one of his articles in MSJ mag. Good Luck! (There seem to be some network problems – I tried to post this 3 times, so far)

          INTP "Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra

          1 Reply Last reply
          0
          • M marcelse

            Thanks for your reply John, I have read a lot of documentation, but only info I got is that operation system will decide what memmory will give to application, physical or virtual, but I have to be 100% sure that sensitive data were not written on HDD.

            marcelse

            R Offline
            R Offline
            Russell
            wrote on last edited by
            #5

            I think that you can't be sure of that: it is the operating system that decide to store temporary part of the virtual memory on the HDD to free some resources. Probally you can't bypass that mechanism, I don't know any function to mark the pages of memory as "sensitive" and leave they on the RAM. Sorry

            Cheers, Russell

            1 Reply Last reply
            0
            • M marcelse

              Purpose is to develop secure application, which will store sensitive data only in RAM, preventing sensitive data to be written on hard drive. Turning off the computer will erase data stored in RAM. THANKS A LOT

              marcelse

              N Offline
              N Offline
              Nemanja Trifunovic
              wrote on last edited by
              #6

              Look at VirtualLock[^]


              Programming Blog utf8-cpp

              1 Reply Last reply
              0
              • J John R Shaw

                I do not know about managed code, but in unmanaged code ‘new’ and ‘malloc’ would not normally allocate virtual memory, although that may have changed. Dig through the docs and code to find out.

                INTP "Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra

                S Offline
                S Offline
                Stephen Hewitt
                wrote on last edited by
                #7

                John R. Shaw wrote:

                do not know about managed code, but in unmanaged code ‘new’ and ‘malloc’ would not normally allocate virtual memory, although that may have changed. Dig through the docs and code to find out.

                new and malloc do allocate virtual memory and have done since memory virtualisation was introduced.

                Steve

                1 Reply Last reply
                0
                • M marcelse

                  Purpose is to develop secure application, which will store sensitive data only in RAM, preventing sensitive data to be written on hard drive. Turning off the computer will erase data stored in RAM. THANKS A LOT

                  marcelse

                  S Offline
                  S Offline
                  sanket patel
                  wrote on last edited by
                  #8

                  Hello! seach for the concepts like RamFS, RAM disk.... http://www.superspeed.com/desktop/ramdisk.php

                  sanket patel

                  M 2 Replies Last reply
                  0
                  • S sanket patel

                    Hello! seach for the concepts like RamFS, RAM disk.... http://www.superspeed.com/desktop/ramdisk.php

                    sanket patel

                    M Offline
                    M Offline
                    marcelse
                    wrote on last edited by
                    #9

                    THANK YOU ALL, FOR YOUR REPLY, I will try to find out more about ramfs,virtuallock, AWE - alocatephysicalpage REGARDS

                    marcelse

                    1 Reply Last reply
                    0
                    • S sanket patel

                      Hello! seach for the concepts like RamFS, RAM disk.... http://www.superspeed.com/desktop/ramdisk.php

                      sanket patel

                      M Offline
                      M Offline
                      marcelse
                      wrote on last edited by
                      #10

                      REPLY TO ALL: Solution is AWE .... Address Windowing Extensions it can allocate physical RAM and then map it to use... not so straightforward but, I hope it will fit my needs.. THANKS

                      marcelse

                      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