What is meaning of small footprint in terms of programming?
Asked Answered
C

6

46

I heard many libraries such as JXTA and PjSIP have smaller footprints. Is this pointing to small resource consumption or something else?

Calves answered 24/10, 2009 at 13:50 Comment(0)
Y
50

Footprint designates the size occupied by your application in computer RAM memory.

Footprint can have different meaning when speaking about memory consumption. In my experience, memory footprint often doesn't include memory allocated on the heap (dynamic memory), or resource loaded from disc etc. This is because dynamic allocations are non constant and may vary depending on how the application or module is used. When reporting "low footprint" or "high footprint", a constant or top measure of the required space is usually wanted.

If for example including dynamic memory in the footprint report of an image editor, the footprint would entirely depend on the size of the image loaded into the application by the user.

In the context of a third party library, the library author can optimize the static memory footprint of the library by assuring that you never link more code into your application binary than absolutely needed. A common method used for doing this in for instance C, is to distribute library functions to separate c-files. This is because most C linkers will link all code from a c-file into your application, not just the function you call. So if you put a single function in the c-file, that's all the linker will incoporate into your application when calling it. If you put five functions in the c-file the linker will probably link all of them into your app even if you only use one of them.

All this being said, the general (academic) definition of footprint includes all kinds of memory/storage aspects.

Yee answered 24/10, 2009 at 13:52 Comment(0)
A
9

From Wikipedia Memory footprint article:

Memory footprint refers to the amount of main memory that a program uses or references while running.

This includes all sorts of active memory regions like code segment containing (mostly) program instructions (and occasionally constants), data segment (both initialized and uninitialized), heap memory, call stack, plus memory required to hold any additional data structures, such as symbol tables, debugging data structures, open files, shared libraries mapped to the current process, etc., that the program ever needs while executing and will be loaded at least once during the entire run.

Anaglyph answered 1/8, 2014 at 8:54 Comment(0)
J
5

Generally it's the amount of memory it takes up - the 'footprint' it leaves in memory when running. However it can also refer to how much space it takes up on your harddrive - although these days that's less of an issue.

If you're writing an app and have memory limitations, consider running a profiler to keep track of how much your program is using.

Jag answered 24/10, 2009 at 13:55 Comment(0)
L
4

It does refer to resources. Particularly memory. It requires a smaller amount of memory when running.

Lipread answered 24/10, 2009 at 13:53 Comment(0)
W
1

yes, resources such as memory or disk

Woo answered 24/10, 2009 at 13:52 Comment(0)
M
-1

Footprint in Computing i-e for computer programs or Computer machines is referred as the occupied device memory , for a program , process , code ,etc

Mockery answered 2/1, 2021 at 19:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.