obj: make data buffer persistent
obj: fix logging alloc

The alloc operation should be logged before allocating memory.