Support for counting memory allocations