Implement allocated_bytes to test for memory leaks