# Computing the footprint of a foundation library

**URL:** <https://forum.microej.com/t/computing-the-footprint-of-a-foundation-library/932>\
**Category:** Technical Support\
**Created:** [September 1, 2021, 3:00pm UTC](https://forum.microej.com/t/computing-the-footprint-of-a-foundation-library/932 "2021-09-01T15:00:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jadams](https://forum.microej.com/letter_avatar_proxy/v4/letter/j/e480ec/32.png) [@jadams](https://forum.microej.com/u/jadams)\
**Post date:** [September 1, 2021, 3:00pm UTC](https://forum.microej.com/t/computing-the-footprint-of-a-foundation-library/932/1 "2021-09-01T15:00:50Z")

</div>

Hello,

Following your [Foundation Library tutorial on GitHub](https://github.com/MicroEJ/How-To/tree/master/FoundationLibrary-Get-Started), I created a new foundation library for my platform and adapted to my needs.

Now, I would like to know its footprint. When I open my .map file, I can find symbols in the ApplicationCode section, but I would like an automated way to either put them in a dedicated category, or at least have their total footprint output in the console.  
Is there a way to customize the .map file view to have such additional information?

---

<div class="post-metadata">

**Author:** ![frederic.riviere](https://forum.microej.com/user_avatar/forum.microej.com/frederic.riviere/32/58_2.png) [@frederic.riviere](https://forum.microej.com/u/frederic.riviere)\
**Post date:** [September 1, 2021, 3:44pm UTC](https://forum.microej.com/t/computing-the-footprint-of-a-foundation-library/932/2 "2021-09-01T15:44:14Z")

</div>

Hi,

Yes, it it possible to extend the Memory Map Analyzer with custom categories in addition to the default ones provided by the Platform.

After opening a .map file, you can browse for additional Memory Map Scripts (`.mms` files) as shown below:

 ![image](https://forum.microej.com/uploads/default/original/1X/810b85264774945fac68345113f87b4b2203f48c.png)

The script contains commands for the Memory Map Interpretor (see [MicroEJ Linker — MicroEJ Documentation](https://docs.microej.com/en/latest/ApplicationDeveloperGuide/linker.html#map-file-interpretor) for available commands)

In your case, you have to create a new graph (aka a new group of sections) from symbols names corresponding to your library code.

Usually, the library is declared in a dedicated Java Package.  
Assuming your custom library is in the `com.mycompany` package, you can declare in a `.mms` file the following command with the given symbol pattern:

```auto
createGraphNoRec MyCustomLib _java_[A]*[LP]com_mycompany.*

```

Then browse this file and press the `Run` button.  
Your new category will appear in the list in alphabetical order:

![image](https://forum.microej.com/uploads/default/original/1X/85c60950aeaa3d327bc22ea8f15d201d62a24322.png)

Hope this helps,

–Frédéric

---

<div class="post-metadata">

**Author:** ![jadams](https://forum.microej.com/letter_avatar_proxy/v4/letter/j/e480ec/32.png) [@jadams](https://forum.microej.com/u/jadams)\
**Post date:** [September 2, 2021, 1:25pm UTC](https://forum.microej.com/t/computing-the-footprint-of-a-foundation-library/932/3 "2021-09-02T13:25:00Z")

</div>

Hello Frédéric,

That worked perfectly. Thanks a lot!
