# Memory Profiling Part 3. Memory Footprint with SDE

DevFeed: [Memory Profiling Part 3. Memory Footprint with SDE](<https://devfeed.tech/articles/memory-profiling-part-3-memory-footprint-with-sde-13638.md>)

Original publisher: [Read original article](<https://easyperf.net/blog/2024/02/12/Memory-Profiling-Part3>)

Author: Denis Bakhvalov

Published: 2024-02-12T05:00:00Z

Content type: tutorial

Language: en

Sources: [Denis Bakhvalov](<https://devfeed.tech/sources/denis-bakhvalov.md>)

Topics: [Code](<https://devfeed.tech/topics/code.md>), [Cache](<https://devfeed.tech/topics/cache.md>), [Instrumentation](<https://devfeed.tech/topics/instrumentation.md>), [Emulator](<https://devfeed.tech/topics/emulator.md>), [x86](<https://devfeed.tech/topics/x86.md>), [Software](<https://devfeed.tech/topics/software.md>)

Tags: [book-chapters](<https://devfeed.tech/tags/book-chapters.md>), [cache](<https://devfeed.tech/tags/cache.md>), [code](<https://devfeed.tech/tags/code.md>), [emulator](<https://devfeed.tech/tags/emulator.md>), [instrumentation](<https://devfeed.tech/tags/instrumentation.md>), [performance-analysis](<https://devfeed.tech/tags/performance-analysis.md>), [software](<https://devfeed.tech/tags/software.md>), [x86](<https://devfeed.tech/tags/x86.md>)

## AI overview

This tutorial explains how to estimate the memory footprint of a simple 4Kx4K matrix multiplication program. It compares naive matrix multiplication with a loop-interchanged version that improves memory access by preserving row-major traversal, then introduces Intel SDE for measurement while noting its substantial runtime cost.

## Source excerpt

Subscribe to my newsletter, support me on Patreon or by PayPal donation. Now let's take a look at how we can estimate the memory footprint. In part 3, we will warm up by measuring the memory footprint of a simple program. In part 4, we will examine the memory footprint of four production workloads. Consider a simple naive matrix multiplication code presented in the listing below on the left. The code multiplies two square 4Kx4K matrices and and writes the result into square 4Kx4K matrix .