gdgqler wrote: >> From the SMS reference manual: "The linkage block [...] must be >> allocated in the common heap so that SMS.ZTHG, or SMS.RTHG called from >> another program, can de-allocate the linkage block correctly." > > I cannot find this quote in my copy of the manual. My manual says > "The linkage block must be in the common heap so that it may be > discarded correctly when the Thing is removed." This is on page > Section 17 1 dated 18/03/96.
Section 13, page 13 from 28/10/98. Should probably be in your copy, too, if not you can download it from here: http://www.kilgus.net/smsqe/development.html > None of this makes it clear to an idiot like me that the linkage > block must be the first, or only, item in allocated space. Well, "things" have always been one of the bigger mysteries of SMSQ/E for me and the documentation didn't really help me much, either...basically all information I give here is stuff I've just looked up for this thread. > I assume then that the placing of a linkage block's address 12 bytes > before the start of the block is intended to be a marker in the > allocated space's header so that general programs which return it to > the heap are alerted to the fact that this particular item is a > Thing linkage block which must be unlinked before being thrown away. The address 12 bytes before is chp_drlk, which the *OS* (not the program!) uses during the SMS.RMJB call to determine if it should call a cleanup routine before the block is returned to the heap. Marcel _______________________________________________ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm
