Re: list query

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

 



2010/4/8 Onkar Mahajan <kern.devel@xxxxxxxxx>:
> What is LIST_POISON1 and LIST_POISON2  ??
>
> #define LIST_POISON1  ((void *) 0x00100100 + POISON_POINTER_DELTA)
> #define LIST_POISON2  ((void *) 0x00200200 + POISON_POINTER_DELTA)
>
> and why they are used ?
>
> Regards,
> Onkar
>

Hi Onkar,

A "poison" value is a convenient value that you can detect when
debugging. For instance if you find out that a pointer is 0xdeadbeef,
you can easily imagine this is some uninitialized value. If you had
used a NULL value, it would be harder to determine whether it's
something uninitialized ...

Hope this helps,
Cédric

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[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