i'm trying to study the linux kernel and reading the kernel code, but i can't understand the structure they use for the page structure as shown below: i mean,why they use union nested in the struct which nested in the union (the code is simplified...)
struct page {
unsigned long flags;
struct address_space *mapping;
struct {
union {
pgoff_t index;
void *freelist;
};
union {
unsigned counters;
struct {
union {
atomic_t _mapcount;
struct {
unsigned inuse:16;
unsigned objects:15;
unsigned frozen:1;
};
};
atomic_t _count;
};
};
};
}