CompuServe Thread

Classic Address Error

3 messages in this thread
#163694From: Daniel WitmerMar 13, 1994 1:43 PM
Allan; >> What types of things is your code doing when it gets Address errors? Accessing data in a structure whos memory was allocated via NewHandle(); If the structure had an odd offset; the Address Error occured. I reorganized my structures so that there would be no odd offsets, and the Errors were less frequent, but still present. >> It may be that you're not using the StripAddress call? If I am using NewHandle(), HLock(), HUnlock(); do I still need to use StripAddress() ? I'll give it a try thanks. DW
#163734From: Steve StockmanMar 13, 1994 5:42 PM
DW: >>> If I am using NewHandle(), HLock(), HUnlock(); do I still need to use StripAddress() ? <<< Unless you are doing funky stuff that can actually swap MMU modes, generally the only reason you should have to StripAddress() is to subtract or compare pointers. For example, in 24-bit mode it is possible that *thisHandle < *thatHandle but StripAddress (*thisHandle) > StripAddress (*thatHandle) The second is the one that actually reflects their relative memory location. Steve
#163894From: Daniel WitmerMar 14, 1994 2:36 PM
Steve; Thanks for the info. DW