summaryrefslogtreecommitdiff
path: root/Source/Kernel/FileSystems
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2009-10-18 18:46:59 +0200
committerAlexis211 <alexis211@gmail.com>2009-10-18 18:46:59 +0200
commit776753bfa0c411f4b1a5680409104904961fcbeb (patch)
tree8e1d90bbc91a6925b86adbda9d91f6be50fd2388 /Source/Kernel/FileSystems
parentccf807eb4ff541bb849c4f370d34123cb23d7d76 (diff)
downloadMelon-776753bfa0c411f4b1a5680409104904961fcbeb.tar.gz
Melon-776753bfa0c411f4b1a5680409104904961fcbeb.zip
Mem::kalloc and Mem::kfree renamed to Mem::alloc and Mem::kfree
I renamed them so that they could have the same name in userland and in kernel space. We'll just know that if we're writing kernel code then we are allocating stuff in kernel memory, and if we're writing user code then we're allocating userland memory.
Diffstat (limited to 'Source/Kernel/FileSystems')
-rw-r--r--Source/Kernel/FileSystems/RamFS/RamFS.class.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Kernel/FileSystems/RamFS/RamFS.class.cpp b/Source/Kernel/FileSystems/RamFS/RamFS.class.cpp
index a224bf8..5997841 100644
--- a/Source/Kernel/FileSystems/RamFS/RamFS.class.cpp
+++ b/Source/Kernel/FileSystems/RamFS/RamFS.class.cpp
@@ -112,11 +112,11 @@ bool RamFS::write(FileNode* file, u64int position, u32int length, u8int *data) {
m_usedSize -= node->getLength();
m_usedSize += end;
- u8int* data = (u8int*)Mem::kalloc(end);
+ u8int* data = (u8int*)Mem::alloc(end);
if (data == 0) return false; //Invalid pointer
if (node->m_data != 0) {
memcpy(data, node->m_data, node->getLength());
- Mem::kfree(node->m_data);
+ Mem::free(node->m_data);
}
node->m_data = data;
node->setLength(end);
@@ -129,7 +129,7 @@ bool RamFS::truncate(FileNode* file) {
if (!m_isWritable) return false;
RamFileNode *node = (RamFileNode*) file;
- Mem::kfree(node->m_data);
+ Mem::free(node->m_data);
node->setLength(0);
node->m_data = 0;
@@ -163,7 +163,7 @@ DirectoryNode* RamFS::createDirectory(DirectoryNode* parent, String name) {
bool RamFS::remove(DirectoryNode* parent, FSNode* node) {
if (node->type() == NT_FILE) {
u8int *d = ((RamFileNode*)node)->m_data;
- if (d != 0) Mem::kfree(d);
+ if (d != 0) Mem::free(d);
}
return true;
}