Marcel Kilgus writes:

Ive had a blocked pipe in my qlusers system somewhere. Just had the odd mail until today when I got 107 all at once!

P Witte wrote:
Of course this isnt half as clever as it looks, as nowadays you arnt
guaranteed (AFAIK) that ALCHP wont return a negative address.

Is that so? ALCHP returns a memory address, so at least on QPC you
would have to have more than 2GB of memory to achieve this. On MMU
based systems it could be possible in theory, but I'm not aware that
it's the case.

Id swear that on one (or more) of the systems Ive used over the years Ive had to
watch out for negative addresses. Whether it was on a QVME or QXL, I dont
recall, only Ive been shy of them ever since. Probably mere superstition.

The much more grave problem is the other one you mention yourself,
namely that ALCHPed memory is discarded upon release of a job, so
you're returning an illegal pointer. Please never ever anybody use
this method. If you insist, use RECHP. This introduces a small memory
leak, but that's preferable to having a race condition.

My intention was to warn, as the technique of producing your own error messages is quite legal, but it breaks down in the case where it is a job's dying croak. However, for the purpose of interactively testing small scripts, there is usually never a problem.


Per
_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm

Reply via email to