[Tuxnes-devel] RAM not explicitly initialized
Brought to you by:
tmmm
From: Jim U. <ji...@3e...> - 2001-03-08 04:25:54
|
Hi, After RAM is malloc'ed (actually, mmap'ed), it is not explicitly initialized. Like the spriteram[] problem mentioned in my earlier e-mail, this one is not noticed on linux because RAM is magically zeroed out by the OS. But this bug bit me hard when I was porting (took me days to find). For clarity RAM should probably be explicitly zeroed out with memset(RAM, 0, 0x8000) or the like. There are a few times when global variables are not initialized either. So far, I found at least CLOCK and CTNI belong in this category. There may be others. -- "closing my eyes, i got a glimpse of several entities moving in front of a giant complex control panel. the creatures were bipedal and of about human size. it was impossible to say more other than they did not move like the giant insect creatures i have seen clearly under the influence of stropharia mushrooms." -- zarkov, "a hit of dmt 10/9/84" ji...@3e... / 0x43340710 / 517B C658 D2CB 260D 3E1F 5ED1 6DB3 FBB9 4334 0710 |