projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add -ul option for limiting user pool size.
[pintos-anon]
/
src
/
filesys
/
fsutil.c
diff --git
a/src/filesys/fsutil.c
b/src/filesys/fsutil.c
index 63363465388d658640260c6631cebbc3cab12116..7756946587e26873a6cb5aa9f723eb91e39adfd4 100644
(file)
--- a/
src/filesys/fsutil.c
+++ b/
src/filesys/fsutil.c
@@
-55,7
+55,7
@@
copy_in (const char *filename, off_t size)
PANIC ("%s: open failed", filename);
/* Do copy. */
PANIC ("%s: open failed", filename);
/* Do copy. */
- buffer = palloc_get (PAL_ASSERT);
+ buffer = palloc_get
_page
(PAL_ASSERT);
sector = 0;
while (size > 0)
{
sector = 0;
while (size > 0)
{
@@
-66,7
+66,7
@@
copy_in (const char *filename, off_t size)
filename, (unsigned long long) size);
size -= chunk_size;
}
filename, (unsigned long long) size);
size -= chunk_size;
}
- palloc_free (buffer);
+ palloc_free
_page
(buffer);
file_close (dst);
}
file_close (dst);
}
@@
-84,7
+84,7
@@
copy_out (const char *filename)
off_t size;
disk_sector_t sector;
off_t size;
disk_sector_t sector;
- buffer = palloc_get (PAL_ASSERT | PAL_ZERO);
+ buffer = palloc_get
_page
(PAL_ASSERT | PAL_ZERO);
/* Open source file. */
src = filesys_open (filename);
/* Open source file. */
src = filesys_open (filename);
@@
-115,7
+115,7
@@
copy_out (const char *filename)
disk_write (dst, sector++, buffer);
size -= chunk_size;
}
disk_write (dst, sector++, buffer);
size -= chunk_size;
}
- palloc_free (buffer);
+ palloc_free
_page
(buffer);
file_close (src);
}
file_close (src);
}
@@
-160,15
+160,15
@@
fsutil_print (const char *filename)
file = filesys_open (filename);
if (file == NULL)
PANIC ("%s: open failed", filename);
file = filesys_open (filename);
if (file == NULL)
PANIC ("%s: open failed", filename);
- buffer = palloc_get (PAL_ASSERT);
+ buffer = palloc_get
_page
(PAL_ASSERT);
for (;;)
{
off_t n = file_read (file, buffer, PGSIZE);
if (n == 0)
break;
for (;;)
{
off_t n = file_read (file, buffer, PGSIZE);
if (n == 0)
break;
- hex_dump (buffer, n, true);
+ hex_dump (
0,
buffer, n, true);
}
}
- palloc_free (buffer);
+ palloc_free
_page
(buffer);
file_close (file);
}
file_close (file);
}