how can know in memory someone addresses in free list

This is a discussion on how can know in memory someone addresses in free list within the C Programming forums, part of the General Programming Boards category; how to know whether in memory specific addresses is in free list or use list I can type to someone ...

  1. #1
    Registered User
    Join Date
    Oct 2005
    Posts
    7

    how can know in memory someone addresses in free list

    how to know whether in memory specific addresses is in
    free list or use list

    I can type to someone addresses a value
    like:

    *(char*)0x0012FE10 = 'a';

    but how can know 0x0012FE10 in free list or in use list
    thanks!

  2. #2
    Even death may die... Dante Shamest's Avatar
    Join Date
    Apr 2003
    Location
    Malaysia
    Posts
    970
    If you're asking if it's possible to check if an address points to valid memory, I don't think you can (other than checking for NULL).

  3. #3
    cwr
    cwr is offline
    Registered Luser cwr's Avatar
    Join Date
    Jul 2005
    Location
    Sydney, Australia
    Posts
    868
    If you actually have a need to do the above, then you're writing low enough level code that you should know how your allocation implementation works.

    If you're writing an application, why would you ever need to check a specific address like that?

  4. #4
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,066
    I don't know if I'm the only one that doesn't fully understand what you're asking.

    Try asking in your native language and perhaps someone will understand.
    Sent from my iPadŽ

  5. #5
    cwr
    cwr is offline
    Registered Luser cwr's Avatar
    Join Date
    Jul 2005
    Location
    Sydney, Australia
    Posts
    868
    Quote Originally Posted by SlyMaelstrom
    I don't know if I'm the only one that doesn't fully understand what you're asking.

    Try asking in your native language and perhaps someone will understand.
    I think I know what he's asking, I just don't understand _why_ he's asking it. And I don't think we should be encouraging a language other than english on an english speaking forum, do you?

  6. #6
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,066
    Well, I wouldn't encourage starting a topic in a foreign language, but when he's tried English to no avail, then perhaps, he would be better off asking in a language more comfortable to him.
    Sent from my iPadŽ

  7. #7
    cwr
    cwr is offline
    Registered Luser cwr's Avatar
    Join Date
    Jul 2005
    Location
    Sydney, Australia
    Posts
    868
    I think they want to know how to determine whether or not a specific address belongs to an already allocated chunk of memory. I could be wrong, but I'm sure they'll clarify if so. Asking in a language other than english is not particularly productive.

  8. #8
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >but how can know 0x0012FE10 in free list or in use list
    Well, you could store all of your variables and dynamic memory in your own "use list", then exhaustively search for that address. But that's a kludge, and it suggests that you're trying to do something that doesn't need to be done.
    My best code is written with the delete key.

  9. #9
    Registered User
    Join Date
    Oct 2005
    Posts
    7
    sorry, I dont know english
    I want and try to learn english
    bye bye!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Free Store of memory
    By George2 in forum C++ Programming
    Replies: 6
    Last Post: 11-12-2007, 01:27 PM
  2. singly linked circular list
    By DarkDot in forum C++ Programming
    Replies: 0
    Last Post: 04-24-2007, 08:55 PM
  3. Program that displays amount of free memory
    By trancedeejay in forum Linux Programming
    Replies: 3
    Last Post: 01-13-2006, 12:27 PM
  4. Please Help - Problem with Compilers
    By toonlover in forum C++ Programming
    Replies: 5
    Last Post: 07-23-2005, 10:03 AM
  5. C programming-Linked list problem
    By male4329 in forum C Programming
    Replies: 18
    Last Post: 06-02-2005, 02:05 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21