Results 1 to 5 of 5

Thread: Memory addresses.

  1. #1

    Thread Starter
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Memory addresses.

    Hey.
    I was in a lecture today about pointers, in C.
    It got me pretty interested, so I figured it'd be interesting to go through all memory addresses on a computer and retrieve its value. I ran into a few problems and well..here I am to try and clear my confusion:

    1. Is the first memory address 65536 (0x00010000)? If so, why? Why not just 0?
    2. How do I know the last memory address?
    3. When I try to read some memory addresses I get this error:

      Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

      Why are certain memory addresses 'protected'?
    4. Is what I'm trying to do even remotly possible?
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  2. #2
    Banned timeshifter's Avatar
    Join Date
    Mar 2004
    Location
    at my desk
    Posts
    2,465

    Re: Memory addresses.

    The protected memory issue should be a no-brainer for you. Remember the apps I've written in C# lately? What happens if you try to hit memory in use by the app while it's working? I lock it down to ensure that 1) it doesn't go anywhere, and 2) that nothing gets changed on me.

  3. #3
    Hyperactive Member Davadvice's Avatar
    Join Date
    Apr 2007
    Location
    Glasgow (Scotland)
    Posts
    440

    Re: Memory addresses.

    memories, ahh this takes me back about 7-8 years.

    I found this very intresting untill it got complicated and i lost intrest with the guy trying to teach me.

    I believe the answer to your question is as TS stated it is protected to prevent the application that is using it encoutering Errors and to ensure a degree of security i would imagine. It means that anouther applicaiton can use that address as it is in use.

    I think there is an app that comes with VS6.0 called SPY++ that allows you to look at the memory used by a running application, this may be a good tool to understand what is going on.

    Normaly when i see questions on this it's another noob looking to hack a game, because they can't play it legit.

    David

  4. #4

    Thread Starter
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: Memory addresses.

    Yeah I know that topics like these have become "taboo" because of dirty little hackers. Its a shame though because its really interesting technology. Personally Im just interested in how these things work.

    I figured that applications could in some way lock memory addresses, but the last sentence in the error message confuses me:
    This is often an indication that other memory is corrupt.

    Im also still very curious about question 1,2 and 4
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Memory addresses.

    If you get that error message you are reading memory you shouldn't be. If your code is written properly and you're not being malicious then the only reason that that would happen is if some other memory was corrupt, thereby telling your app to access the wrong memory address.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width