Re: [Bug fix PATCH v3] Reusing a resource structure allocated by bootmem

Yasuaki Ishimatsu
2013-04-17T07:16:44Z

Hi David,

2013/04/17 15:52, David Rientjes wrote:
> On Wed, 17 Apr 2013, Yasuaki Ishimatsu wrote:
>
>>> How much memory are we talking about?
>>
>> Hmm. I don't know correctly.
>>
>> Here is kernel message of my system. The message is shown by mem_init().
>>
>
> Do you have an estimate on the amount of struct resource memory that will
> be leaked if entire pages won't be freed?
>

I roughly estimated amount of memory which will leak as follows:

$ wc -l /proc/ioports
92 /proc/ioports
$ wc -l /proc/iomem
226 /proc/iomem

In my system, number of resource structures are 318 and
sizeof(struct resource) is 56 bytes. So even if all resource
structures are leaked, the size is 17 KiB.

Thanks,
Yasuaki Ishimatsu