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.

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.

Marcel

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

Reply via email to