added memorypool.h and improved some measurements