Somewhat OT: About modules coresize

Josh Boyer jwboyer at
Tue May 21 15:44:17 UTC 2013

On Tue, May 21, 2013 at 11:16 AM, Sergio Belkin <sebelk at> wrote:
> 2013/5/21 Przemek Klosowski <przemek.klosowski at>
>> On 05/21/2013 08:50 AM, Sergio Belkin wrote:
>>> I know that is somehat OT, but I was looking for trying to discover what
>>> does mean the size column of lsmod. Some people says is memory used by
>>> the module, but if I run strace lsmod I found that it takes a look to
>>> coresize files at /sys and read
>>> /usr/share/doc/kernel-doc-3.9.2/Documentation/ABI/testing/sysfs-module
>>> and it says "Module size in bytes" but if I see the filesize using ls
>>> don't match
>>> So what does really mean coresize?
>> Modules drop unused memory after initialization so their core resident
>> size doesn't have to correspond to filesize.
> So is it memory used by the module?

It is roughly the memory consumed by the module's code, data, and
symbol sections.  It does not include any memory the module has
dynamically allocated.  If you are curious how this is actually
calculated, the code is in the layout_sections function in the
kernel/module.c file in the kernel tree.


More information about the devel mailing list