En/Je/On 2016-01-22 20:57, pjwitte escribió / skribis / wrote : > Whenever the user requests a block of memory in the Common Heap, the > request is rounded up to the nearest 8 bytes and a 16 byte header is > added. The header looks like this: > > chp_len equ $0000 long LENgth of space in common heap, > including header > chp_drlk equ $0004 long pointer to DRiver LinKage (allocated > space) > chp_nxfr equ $0004 long rel pointer (-4) to NeXt FRee space > (free_space) > chp_ownr equ $0008 long OWNer job id (-1 if not owned) > chp_flag equ $000c long address of FLAG byte, set when space > released > chp_end equ $0010 > > The address returned in register a0 by the MT.ALCHP/sms.achp call > points past this header to the start of the usable area, so relative > to this, chp_len is located at -4(a0).
So those field offsets are used downwards, from the address of chp_len, which is right below the reserved space. Thank you for the explanation. Now I see those keys are in their own file in the SMSQ/E sources. I didn't have them in my files. -- Marcos Cruz http://programandala.net _______________________________________________ QL-Users Mailing List
