some work on memory manager

Signed-off-by: Wilfried Chauveau <ithinuel@gmail.com>