diff --git a/Kernel/include/vfs_ext.h b/Kernel/include/vfs_ext.h
index ec3e0f653008d0833b946e5e17c51b65be19a52f..4fe892331ab810dfcaa01be1fdbb6b7cf17c4e59 100644
--- a/Kernel/include/vfs_ext.h
+++ b/Kernel/include/vfs_ext.h
@@ -304,4 +304,23 @@ extern int	VFS_OpenChild(Uint *Errno, int FD, const char *Name, Uint Mode);
  */
 extern int VFS_Select(int MaxHandle, fd_set *ReadHandles, fd_set *WriteHandles, fd_set *ErrHandles, tTime *Timeout, BOOL IsKernel);
 
+/**
+ * \brief Map a file into memory
+ * \param ErrNo	Error status pointer
+ * \param DestHint	Suggested place for read data
+ * \param Length	Size of area to map
+ * \param Protection	Protection type (see `man mmap`)
+ * \param Flags	Mapping flags
+ * \param FD	File descriptor to load from
+ * \param Offset	Start of region
+ */
+extern void	*VFS_MMap(int *ErrNo, void *DestHint, size_t Length, int Protection, int Flags, int FD, Uint64 Offset);
+
+/**
+ * \brief Unmap memory allocated by VFS_MMap
+ * \param ErrNo	Error status pointer
+ * \param Addr	Address of data to unmap
+ * \param Length	Length of data
+ */
+extern int	VFS_MUnmap(int *ErrNo, void *Addr, size_t Length);
 #endif
diff --git a/Kernel/vfs/mmap.c b/Kernel/vfs/mmap.c
index dbdd4b2a9b7234ac6b8e2d05fafbd66f23a4d96c..98137d44ba89d0ab14378764b31264c2ee777c10 100644
--- a/Kernel/vfs/mmap.c
+++ b/Kernel/vfs/mmap.c
@@ -31,14 +31,16 @@ void *VFS_MMap(int *ErrNo, void *DestHint, size_t Length, int Protection, int Fl
 	npages = ((Offset & (PAGE_SIZE-1)) + Length) / PAGE_SIZE;
 	pagenum = Offset / PAGE_SIZE;
 
-	mapping_dest = DestHint;	
+	mapping_dest = (tVAddr)DestHint;	
 
+#if 0
 	// TODO: Locate space for the allocation
 	if( Flags & MAP_ANONYMOUS )
 	{
 		MM_Allocate(mapping_dest);
 		return (void*)mapping_dest;
 	}
+#endif
 
 	h = VFS_GetHandle(FD);
 	if( !h || !h->Node )	return NULL;
@@ -51,10 +53,10 @@ void *VFS_MMap(int *ErrNo, void *DestHint, size_t Length, int Protection, int Fl
 		prev = pb, pb = pb->Next
 		);
 
+	// - Allocate a block if needed
 	if( !pb || pb->BaseOffset > pagenum )
 	{
 		void	*old_pb = pb;
-		// Allocate if needed
 		pb = malloc( sizeof(tVFS_MMapPageBlock) );
 		if(!pb)	return NULL;
 		pb->Next = old_pb;
@@ -66,6 +68,7 @@ void *VFS_MMap(int *ErrNo, void *DestHint, size_t Length, int Protection, int Fl
 			h->Node->MMapInfo = pb;
 	}
 
+	// - Map (and allocate) pages
 	while( npages -- )
 	{
 		if( pb->PhysAddrs[pagenum - pb->BaseOffset] == 0 )
@@ -75,10 +78,14 @@ void *VFS_MMap(int *ErrNo, void *DestHint, size_t Length, int Protection, int Fl
 			else
 			{
 				// Allocate pages and read data
-				MM_Allocate(mapping_dest);
+				if( MM_Allocate(mapping_dest) == 0 ) {
+					// TODO: Unwrap
+					return NULL;
+				}
 				h->Node->Read(h->Node, pagenum*PAGE_SIZE, PAGE_SIZE, (void*)mapping_dest);
 			}
 			pb->PhysAddrs[pagenum - pb->BaseOffset] = MM_GetPhysAddr( mapping_dest );
+//			MM_SetPageInfo( pb->PhysAddrs[pagenum - pb->BaseOffset], h->Node, pagenum*PAGE_SIZE );
 		}
 		else
 		{