diff options
Diffstat (limited to 'source/components/utilities/utalloc.c')
| -rw-r--r-- | source/components/utilities/utalloc.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/source/components/utilities/utalloc.c b/source/components/utilities/utalloc.c index 3cd82ae898db..e9507ffaff96 100644 --- a/source/components/utilities/utalloc.c +++ b/source/components/utilities/utalloc.c @@ -144,6 +144,40 @@ AcpiUtCreateCaches ( return (Status); } +#ifdef ACPI_ASL_COMPILER + /* + * For use with the ASL-/ASL+ option. This cache keeps track of regular + * 0xA9 0x01 comments. + */ + Status = AcpiOsCreateCache ("Acpi-Comment", sizeof (ACPI_COMMENT_NODE), + ACPI_MAX_COMMENT_CACHE_DEPTH, &AcpiGbl_RegCommentCache); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + + /* + * This cache keeps track of the starting addresses of where the comments + * lie. This helps prevent duplication of comments. + */ + Status = AcpiOsCreateCache ("Acpi-Comment-Addr", sizeof (ACPI_COMMENT_ADDR_NODE), + ACPI_MAX_COMMENT_CACHE_DEPTH, &AcpiGbl_CommentAddrCache); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + + /* + * This cache will be used for nodes that represent files. + */ + Status = AcpiOsCreateCache ("Acpi-File", sizeof (ACPI_FILE_NODE), + ACPI_MAX_COMMENT_CACHE_DEPTH, &AcpiGbl_FileCache); + if (ACPI_FAILURE (Status)) + { + return (Status); + } +#endif + #ifdef ACPI_DBG_TRACK_ALLOCATIONS @@ -210,6 +244,16 @@ AcpiUtDeleteCaches ( (void) AcpiOsDeleteCache (AcpiGbl_PsNodeExtCache); AcpiGbl_PsNodeExtCache = NULL; +#ifdef ACPI_ASL_COMPILER + (void) AcpiOsDeleteCache (AcpiGbl_RegCommentCache); + AcpiGbl_RegCommentCache = NULL; + + (void) AcpiOsDeleteCache (AcpiGbl_CommentAddrCache); + AcpiGbl_CommentAddrCache = NULL; + + (void) AcpiOsDeleteCache (AcpiGbl_FileCache); + AcpiGbl_FileCache = NULL; +#endif #ifdef ACPI_DBG_TRACK_ALLOCATIONS |
