Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
triazo
/
kernel
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
3
Merge Requests
0
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
ba7971ff
authored
Dec 06, 2015
by
triazo
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
add a stupid kmalloc thing
parent
ba565cc6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
src/mem.c
src/mem.h
src/mem.c
View file @
ba7971ff
...
...
@@ -226,3 +226,9 @@ void* malloc(uint32_t bytes)
memory_mark
=
(
void
*
)((
uint32_t
)
memory_mark
+
bytes
);
return
old_mark
;
}
void
*
kmalloc
(
uint32_t
size
__attribute__
((
unused
)))
{
return
page_allocate
();
}
src/mem.h
View file @
ba7971ff
...
...
@@ -48,6 +48,7 @@ page_directory_entry* initiate_directory(); // DEPRECATED
// is free
void
*
memory_mark
;
void
*
kmalloc
(
uint32_t
);
void
*
malloc
(
uint32_t
bytes
);
// Required for elf loading - virtual memory and stuff
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment