lib/test_meminit.c
Source file repositories/reference/linux-study-clean/lib/test_meminit.c
File Facts
- System
- Linux kernel
- Corpus path
lib/test_meminit.c- Extension
.c- Size
- 10516 bytes
- Lines
- 440
- 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/init.hlinux/kernel.hlinux/mm.hlinux/module.hlinux/slab.hlinux/string.hlinux/vmalloc.h
Detected Declarations
function count_nonzero_bytesfunction fill_with_garbage_skipfunction fill_with_garbagefunction do_alloc_pages_orderfunction test_pagesfunction do_kmalloc_sizefunction do_vmalloc_sizefunction test_kvmallocfunction test_ctorfunction do_kmem_cache_sizefunction do_kmem_cache_sizefunction do_kmem_cache_rcu_persistentfunction do_kmem_cache_size_bulkfunction test_kmemcachefunction test_rcu_persistentfunction test_meminit_initmodule init test_meminit_init
Annotated Snippet
module_init(test_meminit_init);
MODULE_DESCRIPTION("Test cases for SL[AOU]B/page initialization at alloc/free time");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/init.h`, `linux/kernel.h`, `linux/mm.h`, `linux/module.h`, `linux/slab.h`, `linux/string.h`, `linux/vmalloc.h`.
- Detected declarations: `function count_nonzero_bytes`, `function fill_with_garbage_skip`, `function fill_with_garbage`, `function do_alloc_pages_order`, `function test_pages`, `function do_kmalloc_size`, `function do_vmalloc_size`, `function test_kvmalloc`, `function test_ctor`, `function do_kmem_cache_size`.
- 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.