From 18cb83f5c711d35bca7165f9d5ce169273b6410d Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 4 Apr 2016 12:41:48 +0200 Subject: [PATCH] OpenGL mode: Disable frequent (and not very usefull) memory deallocation/reallocation to avoid "out of memory" issue due to heap fragmentation (noticeable only with large boards). Note: there is still this issue when switching back legacy mode and to Opengl mode because the heap is still freed and reallocated. --- common/gal/opengl/cached_container.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/gal/opengl/cached_container.cpp b/common/gal/opengl/cached_container.cpp index d50e0454ba..f2e801e952 100644 --- a/common/gal/opengl/cached_container.cpp +++ b/common/gal/opengl/cached_container.cpp @@ -175,7 +175,8 @@ void CACHED_CONTAINER::Delete( VERTEX_ITEM* aItem ) // can create memory fragmentation and no room to reallocate large chuncks // after many free/reallocate cycles during a session using the same complex board // So it can be disable. -#if 1 + // Currently: it is disable to avoid "out of memory" issues +#if 0 // Dynamic memory freeing, there is no point in holding // a large amount of memory when there is no use for it if( m_freeSpace > ( 0.75 * m_currentSize ) && m_currentSize > m_initialSize )