Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
operating-systems
ws21
assignments
Commits
4d8d667b
Commit
4d8d667b
authored
Mar 09, 2011
by
Ben Pfaff
Browse files
bitmap: Fix mistakes in comments.
Reported by a student of Borja Sotomayor <borja@cs.uchicago.edu>.
parent
b14dfcf8
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/kernel/bitmap.c
View file @
4d8d667b
...
...
@@ -71,10 +71,10 @@ last_mask (const struct bitmap *b)
/* Creation and destruction. */
/*
Initializes B to be a bitmap of BIT_CNT bits
and sets all of its bits to
fals
e
.
Returns true if success, false if memory allocation
fail
ed. */
/*
Creates and returns a pointer to a newly allocated bitmap with room for
BIT_CNT (or more) bits. Returns a null pointer if memory allocation
fa
i
ls.
The caller is responsible for freeing the bitmap, with bitmap_destroy(),
when it is no longer need
ed. */
struct
bitmap
*
bitmap_create
(
size_t
bit_cnt
)
{
...
...
@@ -118,8 +118,7 @@ bitmap_buf_size (size_t bit_cnt)
}
/* Destroys bitmap B, freeing its storage.
Not for use on bitmaps created by
bitmap_create_preallocated(). */
Not for use on bitmaps created by bitmap_create_in_buf(). */
void
bitmap_destroy
(
struct
bitmap
*
b
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment