Merge branch 'master' of gitlab.ops-class.org:staff/os161

This commit is contained in:
Guru Prasad Srinivasa
2016-03-01 02:50:11 -05:00
4 changed files with 9 additions and 27 deletions

View File

@@ -19,13 +19,15 @@
// Hack for allocating userspace memory without malloc.
#define BUFFER_SIZE 4096
#ifndef _KERNEL
static char temp_buffer[BUFFER_SIZE];
static char write_buffer[BUFFER_SIZE];
#endif
static inline void * _alloc(size_t size)
{
#ifdef _KERNEL
(void)temp_buffer;
return kmalloc(size);
#else
(void)size;