Extend buffer / smalloc stubs.