Skip to content

Commit

Permalink
Addition to the previous commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
intorr committed Feb 27, 2018
1 parent 8ef9f47 commit 899da7b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/xrCore/xrMemory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,15 @@ void xrMemory::mem_compact()
{
RegFlushKey(HKEY_CLASSES_ROOT);
RegFlushKey(HKEY_CURRENT_USER);
/*
Следующие две команды в целом не нужны.
Современные аллокаторы достаточно грамотно и когда нужно возвращают память операционной системе.
Эта строчки нужны, скорее всего, в определённых ситуациях, вроде использования файлов отображаемых в память,
которые требуют большие свободные области памяти.
Но всё-же чистку tbb, возможно, стоит оставить. Но и это под большим вопросом.
*/
scalable_allocation_command(TBBMALLOC_CLEAN_ALL_BUFFERS, NULL);
//HeapCompact(GetProcessHeap(), 0);
if (g_pStringContainer)
g_pStringContainer->clean();
if (g_pSharedMemoryContainer)
Expand Down

0 comments on commit 899da7b

Please sign in to comment.