|
From: Siva C. <siv...@ya...> - 2004-01-10 10:45:57
|
firstly, thanx Daniel and Oroszi for the descriptive
replyies. I have always thought free(ptr) would put
ptr to NULL.
> Here's a question though - can I do something like
> int* SomeMemory = 0x001249FF;
> printf("%d\n", SomeMemory);
>
> To print whatever is at any memory location (on the
> stack/heap in this case,
> I forget which starts around 0x0012~ in windows). Is
> this valid (dangerous I
> am sure, but can I do this?).
I have typed that bit of code and found that it is a
segementation fault(in Win2000)!
My explanation would be that u r trying to access what
is not meant for or what u said u would not access.
i.e the said memory location has neither been
allocated by new or malloc, nor has been declared
anywhere in the code.
regards,
Siva Chandra
__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus
|