Re: large global static arrays

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 15, 2022 at 12:12 PM Greg KH <greg@xxxxxxxxx> wrote:
>
> On Thu, Dec 15, 2022 at 12:01:37PM +0530, Ani Sinha wrote:
> > On Thu, Dec 15, 2022 at 11:59 AM Greg KH <greg@xxxxxxxxx> wrote:
> > >
> > > On Thu, Dec 15, 2022 at 11:44:32AM +0530, Ani Sinha wrote:
> > > > Hi
> > > >
> > > > I’m curious to know whether large static arrays can be declared inside
> > > > any module ( kernel source .c file).
> > >
> > > Yes.
> > >
> > > > I am aware that kernel stack
> > > > space can be limited and so within the function it’s not a good idea
> > > > to declare large sized arrays. I’m just wondering if the same
> > > > restriction applies to global declaration of arrays.
> > >
> > > As they are not on the stack, they are fine.  See the kernel source for
> > > lots of examples of this.
> >
> > Can you point me to one?
>
> You can search the source tree as easily as I can, so I'll leave it as
> an "exercise for the reader" to complete :)

Yes, I was not trying to be lazy. I did a quick look around and I did
not find a good example. That prompted me to subscribe to this list
and ask the question here (I sent an email earlier without
subscription and it did not go anywhere). When you said there are lots
of examples, I was curious. Maybe I looked in the wrong places. I will
look again.

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux