page-debug-flags.h 906 B

123456789101112131415161718192021222324252627282930
  1. #ifndef LINUX_PAGE_DEBUG_FLAGS_H
  2. #define LINUX_PAGE_DEBUG_FLAGS_H
  3. /*
  4. * page->debug_flags bits:
  5. *
  6. * PAGE_DEBUG_FLAG_POISON is set for poisoned pages. This is used to
  7. * implement generic debug pagealloc feature. The pages are filled with
  8. * poison patterns and set this flag after free_pages(). The poisoned
  9. * pages are verified whether the patterns are not corrupted and clear
  10. * the flag before alloc_pages().
  11. */
  12. enum page_debug_flags {
  13. PAGE_DEBUG_FLAG_POISON, /* Page is poisoned */
  14. };
  15. /*
  16. * Ensure that CONFIG_WANT_PAGE_DEBUG_FLAGS reliably
  17. * gets turned off when no debug features are enabling it!
  18. */
  19. #ifdef CONFIG_WANT_PAGE_DEBUG_FLAGS
  20. #if !defined(CONFIG_PAGE_POISONING) \
  21. /* && !defined(CONFIG_PAGE_DEBUG_SOMETHING_ELSE) && ... */
  22. #error WANT_PAGE_DEBUG_FLAGS is turned on with no debug features!
  23. #endif
  24. #endif /* CONFIG_WANT_PAGE_DEBUG_FLAGS */
  25. #endif /* LINUX_PAGE_DEBUG_FLAGS_H */