sc_mempool.cc revision 13286
16145SN/A/* 26145SN/A * Copyright 2018 Google, Inc. 36145SN/A * 46145SN/A * Redistribution and use in source and binary forms, with or without 56145SN/A * modification, are permitted provided that the following conditions are 66145SN/A * met: redistributions of source code must retain the above copyright 76145SN/A * notice, this list of conditions and the following disclaimer; 86145SN/A * redistributions in binary form must reproduce the above copyright 96145SN/A * notice, this list of conditions and the following disclaimer in the 106145SN/A * documentation and/or other materials provided with the distribution; 116145SN/A * neither the name of the copyright holders nor the names of its 126145SN/A * contributors may be used to endorse or promote products derived from 136145SN/A * this software without specific prior written permission. 146145SN/A * 156145SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 166145SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 176145SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 186145SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 196145SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 206145SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 216145SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 226145SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 236145SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 246145SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 256145SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 266145SN/A * 276145SN/A * Authors: Gabe Black 286145SN/A */ 2911793Sbrandon.potter@amd.com 3011793Sbrandon.potter@amd.com#include "base/logging.hh" 317832SN/A#include "systemc/ext/dt/sc_mempool.hh" 327832SN/A 339356Snilay@cs.wisc.edunamespace sc_core 348232SN/A{ 357054SN/A 368257SBrad.Beckmann@amd.comvoid * 3711793Sbrandon.potter@amd.comsc_mempool::allocate(std::size_t sz) 387054SN/A{ 396145SN/A return ::operator new(sz); 407055SN/A} 417055SN/Avoid 427054SN/Asc_mempool::release(void *p, std::size_t sz) 438257SBrad.Beckmann@amd.com{ 446145SN/A ::operator delete(p); 456145SN/A} 466145SN/Avoid 476145SN/Asc_mempool::display_statistics() 486145SN/A{ 496145SN/A warn("%s not implemented.\n", __PRETTY_FUNCTION__); 506145SN/A} 5111096Snilay@cs.wisc.edu 5211096Snilay@cs.wisc.edu}; 5311096Snilay@cs.wisc.edu