How about making CFFI:FOREIGN-ALLOC always return a null pointer regardless of what malloc() would do? Would that work?
Yes; this is fine with me. I was just thinking one could prevent testing for :count 0 by allowing the same return value as malloc() and thus not introduce an overhead.