Kernel: fork() now copies allocations through FixedWidthAllocator

This commit is contained in:
Bananymous
2023-05-28 21:34:35 +03:00
parent ec73db0057
commit 09666adc53
4 changed files with 121 additions and 40 deletions

View File

@@ -8,7 +8,7 @@
int main()
{
char* string = (char*)malloc(5000);
char* string = (char*)malloc(10);
strcpy(string, "Hello");
printf("forking\n");
@@ -19,6 +19,8 @@ int main()
printf("child '%s'\n", string);
return 0;
}
strcpy(string, "World");
printf("parent '%s'\n", string);
return 0;