projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add warnings for missing disks with various projects.
[pintos-anon]
/
src
/
threads
/
palloc.h
diff --git
a/src/threads/palloc.h
b/src/threads/palloc.h
index 38a401cb10b4971de6a59f5e5617ab480ba14270..2d41cf6d52e186633f014b7c0a5b482c08fc33b6 100644
(file)
--- a/
src/threads/palloc.h
+++ b/
src/threads/palloc.h
@@
-1,8
+1,9
@@
#ifndef THREADS_PALLOC_H
#define THREADS_PALLOC_H
#ifndef THREADS_PALLOC_H
#define THREADS_PALLOC_H
-#include <std
int
.h>
+#include <std
def
.h>
+/* How to allocate pages. */
enum palloc_flags
{
PAL_ASSERT = 001, /* Panic on failure. */
enum palloc_flags
{
PAL_ASSERT = 001, /* Panic on failure. */
@@
-10,8
+11,13
@@
enum palloc_flags
PAL_USER = 004 /* User page. */
};
PAL_USER = 004 /* User page. */
};
+/* Maximum number of pages to put in user pool. */
+extern size_t user_page_limit;
+
void palloc_init (void);
void palloc_init (void);
-void *palloc_get (enum palloc_flags);
-void palloc_free (void *);
+void *palloc_get_page (enum palloc_flags);
+void *palloc_get_multiple (enum palloc_flags, size_t page_cnt);
+void palloc_free_page (void *);
+void palloc_free_multiple (void *, size_t page_cnt);
#endif /* threads/palloc.h */
#endif /* threads/palloc.h */