projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update.
[pintos-anon]
/
src
/
threads
/
malloc.c
diff --git
a/src/threads/malloc.c
b/src/threads/malloc.c
index 20773548d9ee2499b68a22e89e3b222694ef985c..f74d43960f60d11643728fd75b19c37d7c9ae354 100644
(file)
--- a/
src/threads/malloc.c
+++ b/
src/threads/malloc.c
@@
-57,7
+57,7
@@
struct arena
/* Free block. */
struct block
{
/* Free block. */
struct block
{
-
list_elem free_elem;
/* Free list element. */
+
struct list_elem free_elem;
/* Free list element. */
};
/* Our set of descriptors. */
};
/* Our set of descriptors. */
@@
-161,7
+161,7
@@
calloc (size_t a, size_t b)
void *p;
size_t size;
void *p;
size_t size;
- /* Calculate block size. */
+ /* Calculate block size
and make sure it fits in size_t
. */
size = a * b;
if (size < a || size < b)
return NULL;
size = a * b;
if (size < a || size < b)
return NULL;
@@
-198,7
+198,7
@@
free (void *p)
}
#ifndef NDEBUG
}
#ifndef NDEBUG
- memset (b, 0xc
d
, d->block_size);
+ memset (b, 0xc
c
, d->block_size);
#endif
lock_acquire (&d->lock);
#endif
lock_acquire (&d->lock);