linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Timur Tabi <ttabi@interactivesi.com>
To: Linux MM mailing list <linux-mm@kvack.org>
Subject: What is field map in free_area_t?
Date: Thu, 22 Jun 2000 12:33:24 -0500	[thread overview]
Message-ID: <20000622174020Z131174-21004+48@kanga.kvack.org> (raw)

Before I ask my question, I'd like to thank everyone who's helped me so far.  I
really appreciate all this help, and it is making a big difference in my ability
to understand the Linux kernel.  I look forward to the day when I can answer
other people's questions, and once I'm done, I'm planning on writing a document
that explains what I've learned.

Could someone explain to me what the "map" field of struct free_area_t does? 
It's defined in mmzone.h:

typedef struct free_area_struct {
	struct list_head	free_list;
	unsigned int	*map;
} free_area_t;

It appears to be a pointer to some kind of field of bits, but that's all I
could figure out.  It's used in two places:

page_alloc.c, function __free_pages_ok:

	if (!test_and_change_bit(index, area->map))

and in function free_area_init_core:

	zone->free_area[i].map = 
	  (unsigned int *) alloc_bootmem_node(nid, bitmap_size);

It's also part of the MARK_USED macro:

#define MARK_USED(index, order, area) \
	change_bit((index) >> (1+(order)), (area)->map)

which is used in functions expand() and rmqueue().



--
Timur Tabi - ttabi@interactivesi.com
Interactive Silicon - http://www.interactivesi.com

When replying to a mailing-list message, please don't cc: me, because then I'll just get two copies of the same message.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/

                 reply	other threads:[~2000-06-22 17:33 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=20000622174020Z131174-21004+48@kanga.kvack.org \
    --to=ttabi@interactivesi.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