check memory allocations