From: Israel Jacquez <mrkotfw@gmail.com>
To: linux-mm@kvack.org
Subject: Some confusion with how the SLOB allocator works
Date: Tue, 2 Oct 2012 10:07:03 -0700 [thread overview]
Message-ID: <CAJdDbRBOf=GYuM90+8TSPYNNdHpNfUbT_G0QiZi-+TnVbudkJg@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 787 bytes --]
Hello everyone,
I'm studying the SLOB allocator and I'm having a bit of a hard time
understanding how slob_page_alloc() works. Particularly, what I don't
understand is the structure of a "cleared" linked slob_page. For example,
the first slob_page is dedicated for allocations (0, 256B]. Let's assume
that no allocations have been done. Then if a single slob_page is 4KiB (2 ^
12) and each "block" is 2B (2 ^ 2) then are there 2 ^ 10 blocks in that
slob_page?
What is also confusing is what the metadata in each free/allocated block
represents. If there is allocation request of 64B, that would go into the
list of slob_page(s) dedicated to allocations within (0,256B]. The next
pointer is pointing to the very first block of the slob_page. What value
(in units) does that block have?
[-- Attachment #2: Type: text/html, Size: 924 bytes --]
reply other threads:[~2012-10-02 17:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAJdDbRBOf=GYuM90+8TSPYNNdHpNfUbT_G0QiZi-+TnVbudkJg@mail.gmail.com' \
--to=mrkotfw@gmail.com \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox