summaryrefslogtreecommitdiff
path: root/source/compiler/aslcompile.c
diff options
context:
space:
mode:
authorRobert Moore <Robert.Moore@intel.com>2014-08-14 09:50:01 -0700
committerRobert Moore <Robert.Moore@intel.com>2014-08-14 09:50:01 -0700
commitfcd2e228352682e64e60d594b228f8544241b580 (patch)
tree845bb99d2b22a94121b5c9ff2514b2c7a29b67a2 /source/compiler/aslcompile.c
parentf1596580344531d9ae7e68e3f6a20135f9afd976 (diff)
downloadacpica-fcd2e228352682e64e60d594b228f8544241b580.tar.gz
iASL/TableCompiler: Add object caching, cleanup memory leaks.
Add object caches for the field and subtable objects, to improve performance and to simplify memory management.
Diffstat (limited to 'source/compiler/aslcompile.c')
-rw-r--r--source/compiler/aslcompile.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/compiler/aslcompile.c b/source/compiler/aslcompile.c
index d47d87e95..a051e0f77 100644
--- a/source/compiler/aslcompile.c
+++ b/source/compiler/aslcompile.c
@@ -836,31 +836,48 @@ void
CmDeleteCaches (
void)
{
+ UINT32 BufferCount;
ASL_CACHE_INFO *Next;
/* Parse Op cache */
+ BufferCount = 0;
while (Gbl_ParseOpCacheList)
{
Next = Gbl_ParseOpCacheList->Next;
ACPI_FREE (Gbl_ParseOpCacheList);
Gbl_ParseOpCacheList = Next;
+ BufferCount++;
}
+ DbgPrint (ASL_DEBUG_OUTPUT,
+ "%u ParseOps, Buffer size: %u ops (%u bytes), %u Buffers\n",
+ Gbl_ParseOpCount, ASL_PARSEOP_CACHE_SIZE,
+ (sizeof (ACPI_PARSE_OBJECT) * ASL_PARSEOP_CACHE_SIZE), BufferCount);
+
+ Gbl_ParseOpCount = 0;
Gbl_ParseOpCacheNext = NULL;
Gbl_ParseOpCacheLast = NULL;
RootNode = NULL;
/* Generic string cache */
+ BufferCount = 0;
while (Gbl_StringCacheList)
{
Next = Gbl_StringCacheList->Next;
ACPI_FREE (Gbl_StringCacheList);
Gbl_StringCacheList = Next;
+ BufferCount++;
}
+ DbgPrint (ASL_DEBUG_OUTPUT,
+ "%u Strings (%u bytes), Buffer size: %u bytes, %u Buffers\n",
+ Gbl_StringCount, Gbl_StringSize, ASL_STRING_CACHE_SIZE, BufferCount);
+
+ Gbl_StringSize = 0;
+ Gbl_StringCount = 0;
Gbl_StringCacheNext = NULL;
Gbl_StringCacheLast = NULL;
}