obj: change void* to uint64_t in alloc and free
obj: make data buffer persistent
obj: fix logging alloc

The alloc operation should be logged before allocating memory.
Merge pull request #17 from ldorau/obj-make-data-persistent-fix-logging-alloc

obj: make data buffer persistent and fix logging alloc