[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

avoiding macptr allocation



I miss being able to use nil as a null pointer argument to traps. Is there
any chance you could bring this back?
(%null-ptr) always allocates a new (null) macptr (right?). I need to use
a lot of null pointers so I'd like to avoid creating a lot of null macptrs.
Can you see any problem with using:
 (defconstant *null-ptr* (%null-ptr)
Maybe you'd consider making it a MCL defined constant.

In your docs you mention the under some circumstances the compiler will
avoid allocating macptrs. The example given is:
 (%get-long (%int-to-prt addr))

Could you elaborate on the circumstances when the compiler can make
this optimization. Is it only in the %get,%put functions?

Is a macptr allocated in the following rlet:
(rlet ((pb :ParamBlockRec
           :ioCompletion (%null-ptr)
           :ioRefNum refNum))
If so, is there a way to rewrite it so it won't be.

So I can answer these questions for myself in the future, is there some
way I can tell (perhaps using disassemble?)

-ME