Re: Typecasting a void pointer to unsigned long in zsmalloc.c

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

 



On Thu, Jan 23, 2025 at 9:27 AM Sotir Danailov <sndanailov@xxxxxxxxx> wrote:
>
> > This is a requirement that Linux makes for the compiler to work with
> > it for any platform that Linux runs on.
>
> Ah I see, thank you! Is this documented somewhere? I was searching
> for information on this, but nothing came up in the kernel docs.
>

theres a chance that it is implemented as a BUILD_BUG,
which would then be kinda self-documenting.
These are compiled in assertions, and break the build early.
Look at container_of() and marvel at its mechanics.

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

_______________________________________________
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