Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!mit-eddie!apollo!gaz From: gaz@apollo.COM (Gary Zaidenweber) Newsgroups: comp.sys.atari.st Subject: Re: Questions about ST Video Ram Message-ID: <3e308bc4.52e@apollo.COM> Date: 31 Aug 88 15:49:00 GMT References: <657@uhnix2.uh.edu> Organization: Apollo Computer, Chelmsford, Mass. Lines: 25 From article <657@uhnix2.uh.edu>, by uace0@uhnix2.uh.edu (Michael B. Vederman): > > Dear John, (I love "dear John" letters :-) ) > > There is really one little problem with the code you have written, that being if > the block you Malloc is just one byte past a 256 byte boundary, then you will > be wasting 255 bytes, therefore you will need to Malloc at least (32K+255) to > insure that you have at least enough memory to draw a full screen in. Other- > wise you will be overwriting memory which is not yours (a discussion of which > > there has been an abundance of these days :-). > > - Mike Actually, the screen memory takes up 32000, not 32768 bytes (I got that from a previous discussion.) Therefore, if you can malloc() 32K (32768) bytes, and waste N bytes at the beginning, you have 768-N bytes of "padding" at the end before you have to worry about touching memory which you don't own. Easy to make this mistake (lucky motorola didn't call the processor the M69632, huh?) -- UUCP: ...{umix,mit-eddie,uw-beaver}!apollo!gaz ARPA: gaz@apollo.COM AT&T: (508)256-6600 x6081 Its never too late to have a happy childhood!