I'm understanding memory allocation in Linux and doing some changes in buddy allocator (__alloc_pages_nodemask) for my experiments. I create a new flag in struct page->flags (by adding a new flag in enum pageflags in page-flags.h. I set this bit permanently in __alloc_pages_nodemask (to not to be cleared once set and survive all further allocation and freeing. I modify PAGE_FLAGS_CHECK_AT_PREP to ensure it). But I'm not able to see expected behavior.
I'm guessing this is because Linux is also using some different path to allocate memory (probably during boot). Is my hypothesis correct?
Is there any different memory allocation path other than buddy allocator? Where can I find it?