Add buffer / smalloc stubs.