2

In linux code, i just saw this snippet:

struct elf_thread_core_info {
    struct elf_thread_core_info *next;
    struct task_struct *task;
    struct elf_prstatus prstatus;
    struct memelfnote notes[0];
};

struct memelfnote notes[0]; looks new to me. [0] - doesn't it mean 0 elements. Which means it will not allocate any memory at all? If yes, what is the use of having it?

Sandeep
  • 18,356
  • 16
  • 68
  • 108

0 Answers0