mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-06 17:41:04 +00:00
Call malloc_trim() regularly to improve deallocation behavior (#14707)
This commit is contained in:
parent
08485f6781
commit
71893807b3
9 changed files with 99 additions and 4 deletions
|
@ -19,7 +19,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
*/
|
||||
|
||||
#include <fstream>
|
||||
#include <typeinfo>
|
||||
#include "mg_schematic.h"
|
||||
#include "server.h"
|
||||
#include "mapgen.h"
|
||||
|
@ -32,6 +31,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "serialization.h"
|
||||
#include "filesys.h"
|
||||
#include "voxelalgorithms.h"
|
||||
#include "porting.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
@ -80,6 +80,8 @@ Schematic::~Schematic()
|
|||
{
|
||||
delete []schemdata;
|
||||
delete []slice_probs;
|
||||
u32 nodecount = size.X * size.Y * size.Z;
|
||||
porting::TrackFreedMemory(nodecount * sizeof(MapNode));
|
||||
}
|
||||
|
||||
ObjDef *Schematic::clone() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue