projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Mark thread_start() NO_RETURN.
[pintos-anon]
/
src
/
threads
/
palloc.c
diff --git
a/src/threads/palloc.c
b/src/threads/palloc.c
index 0fe5f94b9e9f83c4553c537353957475c21f07aa..3cf8241b1a6152a9497eca3aedcf18e2d0f1dcc2 100644
(file)
--- a/
src/threads/palloc.c
+++ b/
src/threads/palloc.c
@@
-1,8
+1,8
@@
#include "palloc.h"
#include <stddef.h>
#include <stdint.h>
#include "palloc.h"
#include <stddef.h>
#include <stdint.h>
-#include <string.h>
#include "debug.h"
#include "debug.h"
+#include "lib.h"
#include "mmu.h"
/* A free page owned by the page allocator. */
#include "mmu.h"
/* A free page owned by the page allocator. */
@@
-29,7
+29,7
@@
palloc_get (enum palloc_flags flags)
if (free_pages == NULL && uninit_start < uninit_end)
{
palloc_free (uninit_start);
if (free_pages == NULL && uninit_start < uninit_end)
{
palloc_free (uninit_start);
- uninit_start +=
NBPG
;
+ uninit_start +=
PGSIZE
;
}
page = free_pages;
}
page = free_pages;
@@
-37,7
+37,7
@@
palloc_get (enum palloc_flags flags)
{
free_pages = page->next;
if (flags & PAL_ZERO)
{
free_pages = page->next;
if (flags & PAL_ZERO)
- memset (page, 0,
NBPG
);
+ memset (page, 0,
PGSIZE
);
}
else
{
}
else
{
@@
-52,9
+52,9
@@
void
palloc_free (void *page_)
{
struct page *page = page_;
palloc_free (void *page_)
{
struct page *page = page_;
- ASSERT((uintptr_t) page %
NBPG
== 0);
+ ASSERT((uintptr_t) page %
PGSIZE
== 0);
#ifndef NDEBUG
#ifndef NDEBUG
- memset (page, 0xcc,
NBPG
);
+ memset (page, 0xcc,
PGSIZE
);
#endif
page->next = free_pages;
free_pages = page;
#endif
page->next = free_pages;
free_pages = page;