mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +02:00
@@ -54,6 +54,10 @@ VL_DEFINE_DEBUG_FUNCTIONS;
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef HAVE_TCMALLOC
|
||||
#include <gperftools/malloc_extension.h>
|
||||
#endif
|
||||
|
||||
// clang-format off
|
||||
#if defined(_WIN32) || defined(__MINGW32__)
|
||||
# include <windows.h> // LONG for bcrypt.h on MINGW
|
||||
@@ -402,6 +406,15 @@ void V3Os::unlinkRegexp(const string& dir, const string& regexp) {
|
||||
#endif
|
||||
}
|
||||
|
||||
//######################################################################
|
||||
// METHODS (memory)
|
||||
|
||||
void V3Os::releaseMemory() {
|
||||
#ifdef HAVE_TCMALLOC
|
||||
MallocExtension::instance()->ReleaseFreeMemory();
|
||||
#endif
|
||||
}
|
||||
|
||||
//######################################################################
|
||||
// METHODS (random)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user