PK: use alloc and free function pointers
3 files changed