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!
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!
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).
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?
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Ž
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?Originally Posted by SlyMaelstrom
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Ž
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.
>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.
sorry, I dont know english
I want and try to learn english
bye bye!