-=> Quoting Darin Mcbride to Tika Carr <=-
DM> 4 bytes? Should never be a big deal. I've used thousands of bytes of
DM> static memory... not a big deal. If: - it makes your code cleaner,
DM> - it makes your executable noticeably faster
DM> then it is a good thing. Especially the first one. :-)
Well, sometimes there's just no other way, really, as was in the case of
getting that pointer to the font table. Sometimes I feel as guilty as using a
global variable, though.
DM> Pages are a function of the hardware - not much can be done about
DM> that.
DM> Again, since pages are functions of hardware, it can't be done. It's
DM> not the design of the OS, but the design of the hardware.
They should design better hardware. ;> Actually, it's hard enough to keep up
with the changes. I guess some things have to be put up with.
DM> If I(the OS) moved memory around on you(the user program), what would
DM> your pointers be good for anymore? Everything has moved!
Good point (pun not intended) Sometimes I feel like my brain is like that.
But then the compiler should have code that would engage when a page is freed
(doesn't it trigger some kind of IRQ or call?) and then it would update the
pointers... or some crazy thing I have no idea what the heck I'm talking
about!
DM> If there is space available, realloc *CAN* (but doesn't have to) use
DM> it to grow. When it shrinks, it can *NOT* move other memory around to
DM> use up the extra space created.
DM> What other questions? Oh, and I try to avoid realloc at almost all
DM> costs. It's worse than goto in my books. :-)
GOTO! Yuk don't say that *word* (it's even taboo in BASIC these
days!) It can't be that* bad? Maybe realloc can be compared to using global
variables for 5% of your code, but not as bad coding as gotos! ;)
Tika
The 3:00 am Club: http://www.geocities.com/SiliconValley/Haven/1420/
Tika Carr: tika@knightmoves.com [C/C++ Code, Libraries, Info...]
... Bill of Rights: Void where Prohibited by Law.
___ Blue Wave/DOS v2.30
--- QScan/PCB v1.17b / 01-0406
---------------
* Origin: Knight Moves - Rochester,NY 716-865-2106 (1:2613/313)
|