thinking cap
#44
Hello Vandiablo,

"I thought the pointer was pointing to a valid shrine-seed spot, but that the memory at that spot was never reset."

That is still the case, as far as I see.

The actual bit pattern in non initialized memory can be random (untouched) or NULL, depending on the compiler and operating system. NULL is when it is filled with binary zeroes. Random values may produce unexpected results, and nowadays initializing to NULL is common. Btw, some compilers initialize numerical values to mathematical zeroes, but only those.

A pointer is defined by the address of the memory location it points to. Both the address and the memory location hold "values" that can be NULL. If the address is NULL, it will produce a crash at run time. If the pointed value is NULL, the result will depend on the calculations done with it. In our case it limits the randomness until, like you said, the value is overwritten and no longer NULL.
Reply


Messages In This Thread
thinking cap - by jet - 03-08-2003, 03:39 AM
thinking cap - by the Langolier - 03-08-2003, 04:57 AM
thinking cap - by Virgil Tibbs - 03-08-2003, 06:31 AM
thinking cap - by !!SaLtMaN!! - 03-31-2003, 01:48 AM
thinking cap - by LemmingofGlory - 03-31-2003, 02:42 PM
thinking cap - by --Pete - 03-31-2003, 03:24 PM
thinking cap - by !!SaLtMaN!! - 04-01-2003, 12:30 AM
thinking cap - by Elric of Grans - 04-01-2003, 01:06 AM
thinking cap - by --Pete - 04-01-2003, 01:17 AM
thinking cap - by LemmingofGlory - 04-01-2003, 01:25 AM
thinking cap - by Elric of Grans - 04-01-2003, 01:33 AM
thinking cap - by --Pete - 04-01-2003, 01:46 AM
thinking cap - by LemmingofGlory - 04-01-2003, 02:31 AM
thinking cap - by !!SaLtMaN!! - 04-02-2003, 04:41 AM
thinking cap - by the Langolier - 04-02-2003, 08:30 AM
thinking cap - by Jarulf - 04-02-2003, 12:22 PM
thinking cap - by --Pete - 04-02-2003, 09:50 PM
thinking cap - by !!SaLtMaN!! - 04-03-2003, 10:58 PM
thinking cap - by Vandiablo - 04-04-2003, 06:41 AM
thinking cap - by Elric of Grans - 04-04-2003, 06:55 AM
thinking cap - by Vandiablo - 04-04-2003, 07:29 AM
thinking cap - by Jarulf - 04-04-2003, 07:58 AM
thinking cap - by Thecla - 04-04-2003, 10:42 AM
thinking cap - by --Pete - 04-04-2003, 03:15 PM
thinking cap - by LemmingofGlory - 04-04-2003, 06:07 PM
thinking cap - by Jarulf - 04-04-2003, 07:58 PM
thinking cap - by Thecla - 04-05-2003, 02:28 AM
thinking cap - by --Pete - 04-05-2003, 03:02 AM
thinking cap - by Vandiablo - 04-05-2003, 07:21 AM
thinking cap - by Thecla - 04-05-2003, 08:31 AM
thinking cap - by --Pete - 04-05-2003, 04:00 PM
thinking cap - by Bolty - 04-05-2003, 06:31 PM
thinking cap - by Jarulf - 04-05-2003, 08:12 PM
thinking cap - by --Pete - 04-05-2003, 08:42 PM
thinking cap - by Vandiablo - 04-06-2003, 06:03 AM
thinking cap - by Elric of Grans - 04-06-2003, 07:20 AM
thinking cap - by Jarulf - 04-06-2003, 08:58 PM
thinking cap - by Thecla - 04-06-2003, 11:27 PM
thinking cap - by Vandiablo - 04-07-2003, 08:05 AM
thinking cap - by Elric of Grans - 04-07-2003, 08:09 AM
thinking cap - by Jarulf - 04-07-2003, 04:33 PM
thinking cap - by --Pete - 04-07-2003, 05:51 PM
thinking cap - by Vandiablo - 04-15-2003, 04:38 AM
thinking cap - by Zenda - 04-16-2003, 02:15 PM
thinking cap - by Dixen Andomiel - 04-17-2003, 06:28 AM
thinking cap - by Yogi_Baar - 04-17-2003, 07:19 AM
thinking cap - by Cytrex - 04-17-2003, 10:36 AM
thinking cap - by LemmingofGlory - 04-18-2003, 02:05 AM
thinking cap - by Vandiablo - 04-18-2003, 06:29 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)