C Memory Access Preventing

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JIGARJOSHI
    New Member
    • Apr 2007
    • 3

    C Memory Access Preventing

    Hello all,

    how can i allocate block of memory which i can lock..

    mean no one else can read that memory ..

    i don't want to use encryption my data is there as it is
    but i want to lock it so no one can read that data even using pointers or anyelse approch . . . .

    HELP ME OUT...
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by JIGARJOSHI
    Hello all,

    how can i allocate block of memory which i can lock..

    mean no one else can read that memory ..

    i don't want to use encryption my data is there as it is
    but i want to lock it so no one can read that data even using pointers or anyelse approch . . . .

    HELP ME OUT...
    If you are running an ordinary 32 bits MS Windows machine your process runs
    in a 32 bit virtual memory space (2GB or 3GB maximum typically). The OS
    prevents any other process from reading that virtual memory so there's no need
    to worry about anything. On the contrary: if you want another process to be able
    to read your memory you have to explicitly set up a block of shared memory.

    kind regards,

    Jos

    Comment

    • weaknessforcats
      Recognized Expert Expert
      • Mar 2007
      • 9214

      #3
      Consider using a private heap.

      With Windows you use CreateProcessHe ap. More info in Windows via C/C++ by Jeffrey Richter 2007.

      Comment

      Working...