From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.126; helo=mga18.intel.com; envelope-from=jiewen.yao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id AC342202E5458 for ; Fri, 29 Jun 2018 12:27:33 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Jun 2018 12:27:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,287,1526367600"; d="scan'208";a="236691625" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga005.jf.intel.com with ESMTP; 29 Jun 2018 12:27:33 -0700 Received: from fmsmsx153.amr.corp.intel.com (10.18.125.6) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 29 Jun 2018 12:27:33 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX153.amr.corp.intel.com (10.18.125.6) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 29 Jun 2018 12:27:32 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.223]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.116]) with mapi id 14.03.0319.002; Sat, 30 Jun 2018 03:27:30 +0800 From: "Yao, Jiewen" To: Rafael Machado , "edk2-devel@lists.01.org" Thread-Topic: [edk2] Question about memory map entries Thread-Index: AQHUD9w7IudPpcJcvUmy4biMcIrOvKR3m3eg Date: Fri, 29 Jun 2018 19:27:30 +0000 Message-ID: <74D8A39837DF1E4DA445A8C0B3885C503AC75235@shsmsx102.ccr.corp.intel.com> References: In-Reply-To: Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMjZkMzE5M2EtYjRhZi00ZDJjLWJlYzAtMjZjNGViYmE4NzVlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoibm9POVYxWkdpTDg2MmV2WXYzdEpYS2U0VUhSTkhUSlZvRUNVeUNWdFptWDVoSlJ4Y0pKam1nYzNwWnpRSWxsUSJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: Question about memory map entries X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jun 2018 19:27:33 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Shell itself may allocate internal buffer to save something, such as histor= y. Thank you Yao Jiewen > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ra= fael > Machado > Sent: Friday, June 29, 2018 12:06 PM > To: edk2-devel@lists.01.org > Subject: [edk2] Question about memory map entries >=20 > Hi everyone >=20 > I have a question related to the memory map entries. > Doing some tests, we noticed that if I have an application that has a lot > of allocatepool() and freepool() calls, when this app is closed the amoun= t > of entries returned by the memmap shell commands increases a lot. >=20 > Just for reference. This is the mapping before executing the application: >=20 > Type Start End # Pages > Attributes > BS_Code 0000000000000000-0000000000000FFF 0000000000000001 > 000000000000000F > BS_Data 0000000000001000-0000000000001FFF 0000000000000001 > 000000000000000F > BS_Code 0000000000002000-000000000000BFFF 000000000000000A > 000000000000000F > Available 000000000000C000-0000000000057FFF 000000000000004C > 000000000000000F > Reserved 0000000000058000-0000000000058FFF 0000000000000001 > 000000000000000F > Available 0000000000059000-0000000000069FFF 0000000000000011 > 000000000000000F > BS_Data 000000000006A000-000000000006AFFF 0000000000000001 > 000000000000000F > BS_Code 000000000006B000-000000000008BFFF 0000000000000021 > 000000000000000F > Reserved 000000000008C000-000000000009FFFF 0000000000000014 > 000000000000000F > BS_Code 0000000000100000-000000000010FFFF 0000000000000010 > 000000000000000F > Available 0000000000110000-000000004D684FFF 000000000004D575 > 000000000000000F > BS_Data 000000004D685000-000000004D6A4FFF 0000000000000020 > 000000000000000F > Available 000000004D6A5000-000000004E34EFFF 0000000000000CAA > 000000000000000F > LoaderCode 000000004E34F000-000000004E42CFFF 00000000000000DE > 000000000000000F > BS_Data 000000004E42D000-0000000050510FFF 00000000000020E4 > 000000000000000F > ACPI_NVS 0000000050511000-0000000050511FFF 0000000000000001 > 000000000000000F > RT_Data 0000000050512000-0000000050512FFF 0000000000000001 > 800000000000000F > BS_Data 0000000050513000-0000000050673FFF 0000000000000161 > 000000000000000F > BS_Code 0000000050674000-0000000050674FFF 0000000000000001 > 000000000000000F > Available 0000000050675000-0000000052B6EFFF 00000000000024FA > 000000000000000F > BS_Data 0000000052B6F000-0000000053572FFF 0000000000000A04 > 000000000000000F > Available 0000000053573000-0000000053834FFF 00000000000002C2 > 000000000000000F > BS_Data 0000000053835000-0000000053A0DFFF 00000000000001D9 > 000000000000000F > Available 0000000053A0E000-0000000053A64FFF 0000000000000057 > 000000000000000F > BS_Data 0000000053A65000-0000000054778FFF 0000000000000D14 > 000000000000000F > Available 0000000054779000-0000000054785FFF 000000000000000D > 000000000000000F > BS_Data 0000000054786000-00000000547CAFFF 0000000000000045 > 000000000000000F > Available 00000000547CB000-00000000547D3FFF 0000000000000009 > 000000000000000F > BS_Data 00000000547D4000-000000005481DFFF 000000000000004A > 000000000000000F > Available 000000005481E000-000000005481FFFF 0000000000000002 > 000000000000000F > BS_Data 0000000054820000-0000000056683FFF 0000000000001E64 > 000000000000000F > Available 0000000056684000-00000000590C2FFF 0000000000002A3F > 000000000000000F > BS_Code 00000000590C3000-0000000059E83FFF 0000000000000DC1 > 000000000000000F > RT_Code 0000000059E84000-0000000059F4BFFF 00000000000000C8 > 800000000000000F > RT_Data 0000000059F4C000-000000005B164FFF 0000000000001219 > 800000000000000F > Reserved 000000005B165000-000000005B566FFF 0000000000000402 > 000000000000000F > ACPI_NVS 000000005B567000-000000005B599FFF 0000000000000033 > 000000000000000F > ACPI_Recl 000000005B59A000-000000005B5FEFFF 0000000000000065 > 000000000000000F > BS_Data 000000005B5FF000-000000005B5FFFFF 0000000000000001 > 000000000000000F > Available 0000000100000000-000000029E7FFFFF 000000000019E800 > 000000000000000F > Reserved 00000000000A0000-00000000000FFFFF 0000000000000060 > 0000000000000000 > Reserved 000000005B600000-000000005F7FFFFF 0000000000004200 > 0000000000000000 > MMIO 00000000F0000000-00000000F7FFFFFF 0000000000008000 > 8000000000000001 > MMIO 00000000FE010000-00000000FE010FFF 0000000000000001 > 8000000000000001 >=20 > Reserved : 18,039 Pages (73,887,744 Bytes) > LoaderCode: 222 Pages (909,312 Bytes) > LoaderData: 0 Pages (0 Bytes) > BS_Code : 3,582 Pages (14,671,872 Bytes) > BS_Data : 23,116 Pages (94,683,136 Bytes) > RT_Code : 200 Pages (819,200 Bytes) > RT_Data : 4,634 Pages (18,980,864 Bytes) > ACPI_Recl : 101 Pages (413,696 Bytes) > ACPI_NVS : 52 Pages (212,992 Bytes) > MMIO : 32,769 Pages (134,221,824 Bytes) > MMIO_Port : 0 Pages (0 Bytes) > PalCode : 0 Pages (0 Bytes) > Available : 2,039,014 Pages (8,351,801,344 Bytes) > -------------- > Total Memory: 8,089 MB (8,482,492,416 Bytes) >=20 >=20 >=20 > And this is the mapping after executing the application. >=20 >=20 > Type Start End # Pages > Attributes > BS_Code 0000000000000000-0000000000000FFF 0000000000000001 > 000000000000000F > BS_Data 0000000000001000-0000000000001FFF 0000000000000001 > 000000000000000F > BS_Code 0000000000002000-000000000000BFFF 000000000000000A > 000000000000000F > Available 000000000000C000-0000000000057FFF 000000000000004C > 000000000000000F > Reserved 0000000000058000-0000000000058FFF 0000000000000001 > 000000000000000F > Available 0000000000059000-0000000000069FFF 0000000000000011 > 000000000000000F > BS_Data 000000000006A000-000000000006AFFF 0000000000000001 > 000000000000000F > BS_Code 000000000006B000-000000000008BFFF 0000000000000021 > 000000000000000F > Reserved 000000000008C000-000000000009FFFF 0000000000000014 > 000000000000000F > BS_Code 0000000000100000-000000000010FFFF 0000000000000010 > 000000000000000F > Available 0000000000110000-000000004D684FFF 000000000004D575 > 000000000000000F > BS_Data 000000004D685000-000000004D6A4FFF 0000000000000020 > 000000000000000F > Available 000000004D6A5000-000000004E34EFFF 0000000000000CAA > 000000000000000F > LoaderCode 000000004E34F000-000000004E42CFFF 00000000000000DE > 000000000000000F > BS_Data 000000004E42D000-0000000050510FFF 00000000000020E4 > 000000000000000F > ACPI_NVS 0000000050511000-0000000050511FFF 0000000000000001 > 000000000000000F > RT_Data 0000000050512000-0000000050512FFF 0000000000000001 > 800000000000000F > BS_Data 0000000050513000-0000000050673FFF 0000000000000161 > 000000000000000F > BS_Code 0000000050674000-0000000050674FFF 0000000000000001 > 000000000000000F > Available 0000000050675000-0000000052384FFF 0000000000001D10 > 000000000000000F > BS_Data 0000000052385000-0000000053572FFF 00000000000011EE > 000000000000000F > Available 0000000053573000-00000000535D7FFF 0000000000000065 > 000000000000000F > BS_Data 00000000535D8000-000000005363EFFF 0000000000000067 > 000000000000000F > Available 000000005363F000-0000000053834FFF 00000000000001F6 > 000000000000000F > BS_Data 0000000053835000-0000000053A0DFFF 00000000000001D9 > 000000000000000F > Available 0000000053A0E000-0000000053A64FFF 0000000000000057 > 000000000000000F > BS_Data 0000000053A65000-0000000053F8EFFF 000000000000052A > 000000000000000F > Available 0000000053F8F000-0000000053F9AFFF 000000000000000C > 000000000000000F > BS_Data 0000000053F9B000-0000000053F9CFFF 0000000000000002 > 000000000000000F > Available 0000000053F9D000-0000000053FA5FFF 0000000000000009 > 000000000000000F > BS_Data 0000000053FA6000-0000000053FAAFFF 0000000000000005 > 000000000000000F > Available 0000000053FAB000-000000005438CFFF 00000000000003E2 > 000000000000000F > BS_Data 000000005438D000-00000000543A5FFF 0000000000000019 > 000000000000000F > Available 00000000543A6000-0000000054416FFF 0000000000000071 > 000000000000000F > BS_Data 0000000054417000-0000000054417FFF 0000000000000001 > 000000000000000F > Available 0000000054418000-0000000054425FFF 000000000000000E > 000000000000000F > BS_Data 0000000054426000-0000000054427FFF 0000000000000002 > 000000000000000F > Available 0000000054428000-0000000054439FFF 0000000000000012 > 000000000000000F > BS_Data 000000005443A000-000000005443FFFF 0000000000000006 > 000000000000000F > Available 0000000054440000-000000005444FFFF 0000000000000010 > 000000000000000F > BS_Data 0000000054450000-0000000054454FFF 0000000000000005 > 000000000000000F > Available 0000000054455000-0000000054458FFF 0000000000000004 > 000000000000000F > BS_Data 0000000054459000-000000005445BFFF 0000000000000003 > 000000000000000F > Available 000000005445C000-0000000054467FFF 000000000000000C > 000000000000000F > BS_Data 0000000054468000-000000005446BFFF 0000000000000004 > 000000000000000F > Available 000000005446C000-000000005446FFFF 0000000000000004 > 000000000000000F > BS_Data 0000000054470000-0000000054470FFF 0000000000000001 > 000000000000000F > Available 0000000054471000-0000000054471FFF 0000000000000001 > 000000000000000F > BS_Data 0000000054472000-0000000054474FFF 0000000000000003 > 000000000000000F > Available 0000000054475000-0000000054490FFF 000000000000001C > 000000000000000F > BS_Data 0000000054491000-0000000054494FFF 0000000000000004 > 000000000000000F > Available 0000000054495000-00000000544ABFFF 0000000000000017 > 000000000000000F > BS_Data 00000000544AC000-00000000544ACFFF 0000000000000001 > 000000000000000F > Available 00000000544AD000-00000000544CCFFF 0000000000000020 > 000000000000000F > BS_Data 00000000544CD000-00000000544CFFFF 0000000000000003 > 000000000000000F > Available 00000000544D0000-00000000544E1FFF 0000000000000012 > 000000000000000F > BS_Data 00000000544E2000-000000005450CFFF 000000000000002B > 000000000000000F > Available 000000005450D000-000000005451DFFF 0000000000000011 > 000000000000000F > BS_Data 000000005451E000-000000005451EFFF 0000000000000001 > 000000000000000F > Available 000000005451F000-0000000054535FFF 0000000000000017 > 000000000000000F > BS_Data 0000000054536000-0000000054536FFF 0000000000000001 > 000000000000000F > Available 0000000054537000-000000005453EFFF 0000000000000008 > 000000000000000F > BS_Data 000000005453F000-0000000054543FFF 0000000000000005 > 000000000000000F > Available 0000000054544000-0000000054579FFF 0000000000000036 > 000000000000000F > BS_Data 000000005457A000-0000000054585FFF 000000000000000C > 000000000000000F > Available 0000000054586000-0000000054589FFF 0000000000000004 > 000000000000000F > BS_Data 000000005458A000-000000005458CFFF 0000000000000003 > 000000000000000F > Available 000000005458D000-000000005459DFFF 0000000000000011 > 000000000000000F > BS_Data 000000005459E000-000000005459EFFF 0000000000000001 > 000000000000000F > Available 000000005459F000-00000000545A1FFF 0000000000000003 > 000000000000000F > BS_Data 00000000545A2000-00000000545A2FFF 0000000000000001 > 000000000000000F > Available 00000000545A3000-00000000545A7FFF 0000000000000005 > 000000000000000F > BS_Data 00000000545A8000-00000000545A9FFF 0000000000000002 > 000000000000000F > Available 00000000545AA000-0000000054756FFF 00000000000001AD > 000000000000000F > BS_Data 0000000054757000-000000005477EFFF 0000000000000028 > 000000000000000F > Available 000000005477F000-0000000054780FFF 0000000000000002 > 000000000000000F > BS_Data 0000000054781000-0000000054785FFF 0000000000000005 > 000000000000000F > Available 0000000054786000-0000000054789FFF 0000000000000004 > 000000000000000F > BS_Data 000000005478A000-00000000547CBFFF 0000000000000042 > 000000000000000F > Available 00000000547CC000-00000000547CEFFF 0000000000000003 > 000000000000000F > BS_Data 00000000547CF000-00000000547D3FFF 0000000000000005 > 000000000000000F > Available 00000000547D4000-00000000547E7FFF 0000000000000014 > 000000000000000F > BS_Data 00000000547E8000-00000000547F4FFF 000000000000000D > 000000000000000F > Available 00000000547F5000-00000000547FBFFF 0000000000000007 > 000000000000000F > BS_Data 00000000547FC000-000000005481EFFF 0000000000000023 > 000000000000000F > Available 000000005481F000-000000005481FFFF 0000000000000001 > 000000000000000F > BS_Data 0000000054820000-0000000054828FFF 0000000000000009 > 000000000000000F > Available 0000000054829000-0000000054829FFF 0000000000000001 > 000000000000000F > BS_Data 000000005482A000-0000000054CFAFFF 00000000000004D1 > 000000000000000F > Available 0000000054CFB000-0000000054CFCFFF 0000000000000002 > 000000000000000F > BS_Data 0000000054CFD000-0000000055269FFF 000000000000056D > 000000000000000F > Available 000000005526A000-000000005526EFFF 0000000000000005 > 000000000000000F > BS_Data 000000005526F000-0000000056683FFF 0000000000001415 > 000000000000000F > Available 0000000056684000-00000000590C2FFF 0000000000002A3F > 000000000000000F > BS_Code 00000000590C3000-0000000059E83FFF 0000000000000DC1 > 000000000000000F > RT_Code 0000000059E84000-0000000059F4BFFF 00000000000000C8 > 800000000000000F > RT_Data 0000000059F4C000-000000005B164FFF 0000000000001219 > 800000000000000F > Reserved 000000005B165000-000000005B566FFF 0000000000000402 > 000000000000000F > ACPI_NVS 000000005B567000-000000005B599FFF 0000000000000033 > 000000000000000F > ACPI_Recl 000000005B59A000-000000005B5FEFFF 0000000000000065 > 000000000000000F > BS_Data 000000005B5FF000-000000005B5FFFFF 0000000000000001 > 000000000000000F > Available 0000000100000000-000000029E7FFFFF 000000000019E800 > 000000000000000F > Reserved 00000000000A0000-00000000000FFFFF 0000000000000060 > 0000000000000000 > Reserved 000000005B600000-000000005F7FFFFF 0000000000004200 > 0000000000000000 > MMIO 00000000F0000000-00000000F7FFFFFF 0000000000008000 > 8000000000000001 > MMIO 00000000FE010000-00000000FE010FFF 0000000000000001 > 8000000000000001 >=20 > Reserved : 18,039 Pages (73,887,744 Bytes) > LoaderCode: 222 Pages (909,312 Bytes) > LoaderData: 0 Pages (0 Bytes) > BS_Code : 3,582 Pages (14,671,872 Bytes) > BS_Data : 23,366 Pages (95,707,136 Bytes) > RT_Code : 200 Pages (819,200 Bytes) > RT_Data : 4,634 Pages (18,980,864 Bytes) > ACPI_Recl : 101 Pages (413,696 Bytes) > ACPI_NVS : 52 Pages (212,992 Bytes) > MMIO : 32,769 Pages (134,221,824 Bytes) > MMIO_Port : 0 Pages (0 Bytes) > PalCode : 0 Pages (0 Bytes) > Available : 2,038,764 Pages (8,350,777,344 Bytes) > -------------- > Total Memory: 8,089 MB (8,482,492,416 Bytes) >=20 >=20 > I would like to understand better what causes these entries to be created= . > We already checked and there is no memory leak at the code. > What causes these entries to be created? > Can this increase on the memory map entries represent a risk of hanging t= he > system at the subsequent boot? >=20 > Thanks and Regards > Rafael R. Machado > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel