Skip to content

Add kmem_cache explanation to memory allocation section#382

Merged
jserv merged 1 commit into
sysprog21:masterfrom
visitorckw:kmem-cache
Jul 16, 2026
Merged

Add kmem_cache explanation to memory allocation section#382
jserv merged 1 commit into
sysprog21:masterfrom
visitorckw:kmem-cache

Conversation

@visitorckw

@visitorckw visitorckw commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Introduces the kmem_cache for frequent, fixed-size allocations.


Summary by cubic

Adds a runnable kmem_cache example and expands the memory allocation chapter to show when and how to use slab caches for frequent, fixed-size objects. Includes examples/kmem_cache.c, a new kmem_cache target in examples/Makefile, and lkmpg.tex guidance with a sample link plus usage of kmem_cache_create(), kmem_cache_alloc(), kmem_cache_free(), and kmem_cache_destroy().

Written for commit 8350828. Summary will update on new commits.

Review in cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

Re-trigger cubic

Introduces the kmem_cache for frequent, fixed-size allocations.
@jserv
jserv merged commit dfea0e9 into sysprog21:master Jul 16, 2026
8 checks passed
@jserv

jserv commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Thank @visitorckw for contributing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants