lib/alloc_tag.c
Source file repositories/reference/linux-study-clean/lib/alloc_tag.c
File Facts
- System
- Linux kernel
- Corpus path
lib/alloc_tag.c- Extension
.c- Size
- 25941 bytes
- Lines
- 974
- Domain
- Kernel Services
- Bucket
- lib
- Inferred role
- Kernel Services: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Shared kernel service surface used by multiple subsystems, including helpers, cryptography, virtualization support, and async I/O infrastructure.
- Shared kernel service surface used by multiple subsystems, including helpers, cryptography, virtualization support, and async I/O infrastructure.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/alloc_tag.hlinux/execmem.hlinux/fs.hlinux/gfp.hlinux/kallsyms.hlinux/module.hlinux/page_ext.hlinux/pgalloc_tag.hlinux/proc_fs.hlinux/rcupdate.hlinux/seq_buf.hlinux/seq_file.hlinux/string_choices.hlinux/vmalloc.hlinux/kmemleak.h
Detected Declarations
struct allocinfo_privatefunction allocinfo_stopfunction print_allocinfo_headerfunction alloc_tag_to_textfunction allocinfo_showfunction alloc_tag_top_usersfunction pgalloc_tag_splitfunction pgalloc_tag_swapfunction shutdown_mem_profilingfunction alloc_tag_sec_initfunction alloc_tag_alignfunction ensure_alignmentfunction tags_addressablefunction needs_section_memfunction clean_unused_countersfunction clean_unused_module_areas_lockedfunction mas_for_eachfunction find_aligned_areafunction vm_module_tags_populatefunction release_module_tagsfunction load_modulefunction replace_modulefunction alloc_mod_tags_memfunction free_mod_tags_memfunction alloc_mod_tags_memfunction free_mod_tags_memfunction need_page_alloc_taggingfunction __alloc_tag_add_early_pfnfunction alloc_tag_add_early_pfnfunction clear_early_alloc_pfn_tag_refsfunction clear_early_alloc_pfn_tag_refsfunction proc_do_static_keyfunction sysctl_initfunction sysctl_initmodule init alloc_tag_initexport _shared_alloc_tagexport mem_alloc_profiling_keyexport page_alloc_tagging_ops
Annotated Snippet
module_init(alloc_tag_init);
Annotation
- Immediate include surface: `linux/alloc_tag.h`, `linux/execmem.h`, `linux/fs.h`, `linux/gfp.h`, `linux/kallsyms.h`, `linux/module.h`, `linux/page_ext.h`, `linux/pgalloc_tag.h`.
- Detected declarations: `struct allocinfo_private`, `function allocinfo_stop`, `function print_allocinfo_header`, `function alloc_tag_to_text`, `function allocinfo_show`, `function alloc_tag_top_users`, `function pgalloc_tag_split`, `function pgalloc_tag_swap`, `function shutdown_mem_profiling`, `function alloc_tag_sec_init`.
- Atlas domain: Kernel Services / lib.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.