lkml.org 
[lkml]   [2019]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] mod_devicetable.h: reduce sizeof(struct of_device_id) by 80 bytes
From
Date
On 25.04.19 22:31, Rasmus Villemoes wrote:

Hi,

> A typical kernel image has hundreds of static struct of_device_id
> instances (a lot of which are sentinel all-zeroes), each occupying
> ~200 bytes. Nobody initializes the .compatible member with strings
> anywhere near 128 bytes, so a lot of that memory is simply wasted.

I just wonder whether it has to be a fixed size array at all, instead
of an const char* pointer. Using a pointer should, IMHO, offer even
more savings while not having the size limit at all.

Is that struct copied as-is somewhere ?


--mtx

--
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info@metux.net -- +49-151-27565287

\
 
 \ /
  Last update: 2019-04-26 13:06    [W:0.110 / U:0.840 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site