                     cached_blocks.insert(search_key);
                     cached_bytes[gpu] += search_key.bytes;
 
-                    if (debug) printf("\tGPU %d returned %d bytes. %d available blocks cached (%d bytes), %d live blocks outstanding.\n",
-                        gpu, search_key.bytes, cached_blocks.size(), cached_bytes[gpu], live_blocks.size());
+                    if (debug) printf("\tGPU %d returned %lld bytes. %lld available blocks cached (%lld bytes), %lld live blocks outstanding.\n",
+                        gpu, (long long) search_key.bytes, (long long) cached_blocks.size(), (long long) cached_bytes[gpu], (long long) live_blocks.size());
                 }
                 else
                 {

                // Insert into live blocks
                live_blocks.insert(search_key);

                if (debug) printf("\tGPU %d allocating new device block %d bytes. %d available blocks cached (%d bytes), %d live blocks outstanding.\n",
                    gpu, search_key.bytes, cached_blocks.size(), cached_bytes[gpu], live_blocks.size());
            }
        } while(0);


                cached_blocks.erase(block_itr);
                cached_bytes[gpu] -= search_key.bytes;

                if (debug) printf("\tGPU %d reused cached block (%lld bytes). %lld available blocks cached (%lld bytes), %lld live blocks outstanding.\n",
                    gpu, (long long) search_key.bytes, (long long) cached_blocks.size(), (long long) cached_bytes[gpu], (long long) live_blocks.size());
            }
            else
            {
