Add a libc skeleton with a primitive malloc.
This commit is contained in:
parent
eb04242a59
commit
dcc05f2741
7 changed files with 73 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
|||
#include <mammoth/channel.h>
|
||||
#include <mammoth/debug.h>
|
||||
#include <mammoth/thread.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void thread_entry(void* a) {
|
||||
dbgln("In thread");
|
||||
|
|
@ -18,7 +19,7 @@ int main(uint64_t bootstrap_cap) {
|
|||
Thread t2(thread_entry, b);
|
||||
|
||||
uint64_t size = 10;
|
||||
char buff[10];
|
||||
char* buff = (char*)malloc(size);
|
||||
Channel c1;
|
||||
c1.adopt_cap(bootstrap_cap);
|
||||
check(c1.ReadStr(buff, &size));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue