HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

0x100000 vs 0x100008

02-06-2009, 07:43 AM#1
xombie
In quite a few systems now I've seen the number "0x100000" supposedly represent the smallest handle ID, but isn't it 0x100008?
02-06-2009, 08:55 AM#2
Captain Griffen
We had a thread on this...go search...no one's going to go and do all that work again (I hope).
02-06-2009, 09:09 AM#3
DioD
BJ creates some handles.
02-06-2009, 09:40 AM#4
fX_
Can someone pls elaborate what those 0x120134 notations mean?
02-06-2009, 09:47 AM#5
Captain Griffen
0x notation. Google. Your friend. Is.
02-06-2009, 09:49 AM#6
Deaod
'0x' indicates that the following nubmer is notated in hexadecimal (0-9A-F).
02-07-2009, 12:10 AM#7
Earth-Fury
Quote:
Originally Posted by xombie
In quite a few systems now I've seen the number "0x100000" supposedly represent the smallest handle ID, but isn't it 0x100008?
When you're subtracting the lowest handle value from arbitrary handles to use them as array indexes (which is the only use I've seen for those magic numbers), a difference of 8 is irrelevant.

So, my question to you is, who gives a shit?
02-07-2009, 12:14 AM#8
Rising_Dusk
A difference of 8 can make a big difference if you accidentally reference SomeArray[-7]. Woops! Proper coding fixes that issue, though.
02-07-2009, 12:24 AM#9
Earth-Fury
Quote:
Originally Posted by Rising_Dusk
A difference of 8 can make a big difference if you accidentally reference SomeArray[-7]. Woops! Proper coding fixes that issue, though.
If you ever manage to either underflow a unsigned integer which is an array index, or move in to the negatives on a signed integer array index, then you completely and utterly fail at coding, which means you will leak memory like crazy, get more than 8191 handles, and have no room left in an array, making the "trick" of using handle IDs as array indexes worthless to you in the first place.

So, in other words, that was an utterly pointless comment, Dusk.
02-07-2009, 12:29 AM#10
Rising_Dusk
Quote:
Originally Posted by Earth-Fury
If you ever manage to either underflow a unsigned integer which is an array index, or move in to the negatives on a signed integer array index, then you completely and utterly fail at coding, which means you will leak memory like crazy, get more than 8191 handles, and have no room left in an array, making the "trick" of using handle IDs as array indexes worthless to you in the first place.
You've never made a map, so I don't actually expect you to understand. Overflowing arrays by subtracting 0x100000 to get a usable value is very possible if you're not careful. Or maybe you'd rather I just admit that I "completely and utterly fail at coding."
Quote:
Originally Posted by Earth-Fury
So, in other words, that was an utterly pointless comment, Dusk.
Your response sure stands as a paragon for me to follow in the future!
02-07-2009, 12:39 AM#11
Earth-Fury
Quote:
Originally Posted by Rising_Dusk
You've never made a map,
Never released a map. There's a difference between having never made something, and having never made something that lives up to my unreasonably high expectations.
Quote:
Originally Posted by Rising_Dusk
so I don't actually expect you to understand.
The word "abrasive" has been used to describe your personality before. I prefer the term "cheese grater".

Quote:
Originally Posted by Rising_Dusk
Overflowing arrays by subtracting 0x100000 to get a usable value is very possible if you're not careful.
Doing it the first time on a lightning is far different then doing it with any normally allocated handle type, which I've never seen below 0x100000, barring 0x0, which is a test you should always do. (Java tends to throw NullPointerException 's when you don't, as an example.)

Quote:
Originally Posted by Rising_Dusk
Or maybe you'd rather I just admit that I "completely and utterly fail at coding."
Not really, no.

Quote:
Originally Posted by Rising_Dusk
Your response sure stands as a paragon for me to follow in the future!
I can't think of anything more abrasive than a cheese grater. If I do, be assured that it will come up next time we argue.
02-07-2009, 12:47 AM#12
Vexorian
null is 0x100000.
02-07-2009, 03:18 AM#13
Rising_Dusk
Quote:
Originally Posted by Earth-Fury
The word "abrasive" has been used to describe your personality before. I prefer the term "cheese grater".
I like cheese. You're just a big silly with a big mouth is all. I don't have a cutesy name for you, but I'll try to think of one for the next time you try to sound smart. Enjoi! :)
02-07-2009, 05:15 AM#14
Litany
Quote:
Originally Posted by Earth-Fury
The word "abrasive" has been used to describe your personality before. I prefer the term "cheese grater".
I prefer the term "Cassielesque."
02-07-2009, 02:26 PM#15
emjlr3
Hulk Smash this utterly off-topic thread....

Dusk = comes across mean more often then he intends to
Cassiel = down right maniacal
Fury = hopelessly argumentative

end story