std::ostream & operator<<( std::ostream & out, device_free_space< IntType, OrderTag > * fspace ) { if( fspace == NULL ) { out << "{}"; return out; } device_free_space< IntType, OrderTag > loc; assert( cudaMemcpy( &loc, fspace, sizeof( device_free_space< IntType, OrderTag > ), cudaMemcpyDeviceToHost ) == cudaSuccess ); out << "{"; out << "\n\"free_list\": "; #ifdef DUMP_HEAP_VARIABLES dump_free_list( out, loc ); #else out << "[]"; #endif // DUMP_HEAP_VARIABLES out << ",\n\"free_map\": "; #ifdef DUMP_HEAP_VARIABLES dump_free_map( out, loc ); #else out << "[]"; #endif // DUMP_HEAP_VARIABLES out << ",\n\"total\": " << loc.total; out << ",\n\"size\": " << loc.size; out << ",\n\"capacity\": " << loc.capacity; out << "\n}"; return out; }
void Allocator::PopContext( void ) { Dbg_MsgAssert( !m_context_stack.IsEmpty(),( "Heap stack underflow" )); #ifdef __NOPT_DEBUG__ dump_free_list(); dump_used_list(); #endif delete mp_context; Lst::Search< Context > sh; mp_context = sh.FirstItem( m_context_stack ); }