use a memory arena for allocating code generation nodes.

- Since the number of small allocations here is extremely high this will help a lot to prevent fragmentation and since most nodes are collected up front and this is done when no large resources are being loaded it won't cause heap spikes.

let Emit methods delete FxExpression arrays when they are done.
- For some reason the deletion process does not work 100%, there are always some nodes left behind and so far I haven't found them. This ensures that these arrays do not live any longer than needed.
This commit is contained in:
Christoph Oelckers 2016-11-10 15:13:31 +01:00
parent e0bd6a2c0a
commit a60bdc2bfb
9 changed files with 209 additions and 204 deletions

View file

@ -776,4 +776,5 @@ void FFunctionBuildList::Build()
}
FScriptPosition::StrictErrors = false;
mItems.Clear();
FxAlloc.FreeAllBlocks();
}