fork download
  1. #include <stdio.h>
  2.  
  3. #define NOFILE 10
  4.  
  5. struct inode {
  6. int size;
  7. };
  8.  
  9. struct file {
  10. struct inode * ip;
  11. };
  12.  
  13. struct proc_mmap {
  14. int address;
  15. struct file * fsize;
  16. };
  17.  
  18. struct proc {
  19. struct proc_mmap mapped_files[NOFILE];
  20. };
  21.  
  22. int main(void)
  23. {
  24. struct proc * myproc;
  25. printf("%zu\n", sizeof myproc->mapped_files[0].fsize->ip->size);
  26. return 0;
  27. }
  28.  
Success #stdin #stdout 0s 2008KB
stdin
Standard input is empty
stdout
4