So NILF takes -16 but NILL won't take -4? You should post that on the HLASM list. Jonathon Scott of HLASM development is very responsive there.
Charles -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Steve Smith Sent: Thursday, July 19, 2018 7:43 AM To: [email protected] Subject: Re: S0C6 in CSRC4RG1 Thank-you Mr. Relson! Oddly enough, in rerunning my test, it seems that it fails considerably less than half the time. That is, it usually aligns on a 16-byte boundary. This test version is configured to allocate the cpool anchor and extent, plus four 160-byte buffers. This is to stress-test buffer exhaustion logic. The production version uses 4091* buffers, making the total space just under 640KB (which as we all know, should be enough for anybody). That has never failed to align correctly. * The idea is to *avoid* buffer exhaustion, and presently, this seems to be enough. Re specification of rounding mask: I do think -16, -8, etc. are an elegant way to specify these, particularly as they correlate to 16-byte, 8-byte, etc. boundaries. I sure wish they were usable with NILL and NILF. Well, I decided to check before complaining... and (surprise!): 0000028C 0000 0000 00000000 481 NILL R15,-4 ** ASMA031E Invalid immediate or mask field 00000290 C0FB FFFF FFF0 00000000 482 NILF R15,-16 483 * Sigh. sas On Thu, Jul 19, 2018 at 8:01 AM, Peter Relson <[email protected]> wrote: > > Problems: > > 1. Undocumented requirement to quad-word align CPOOL anchor and/or > extent > > in 64-bit mode (and actually undocumented alignment requirements for > all). > > 2. Unable to guarantee quad-word alignment with malloc. > > I will get the first taken care of. The anchor does not need to be > quad-word aligned. > > For the second, as has been pointed out in C syntax but I think not in > words, you would do what everyone used to do prior to STARTBDY keyword of > GETMAIN / STORAGE OBTAIN -- round the start address up to the necessary > boundary, having gotten an additional 8 if you need the length to be some > specific value (or 15 if you do are not guaranteed that the area will at > least be on a doubleword boundary). > > The rounding is typically "Add 15, AND with -16". > > Peter Relson > z/OS Core Technology Design ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
