Commit Graph

6 Commits

Author SHA1 Message Date
Bananymous dfe5a2d665 All: Cleanup all files
Add newline to end of files and remove whitespace from end of lines
2024-01-24 15:53:38 +02:00
Bananymous c773e2ed07 LibC: Optimize malloc even further
aoc2023/day12 now runs in 3.5 seconds on my machine. This is way
better than the old almost hour.
2023-12-14 23:49:25 +02:00
Bananymous 5f640da166 LibC: Optimize malloc by a lot
I now cache first free node in malloc_pool and whether the node is
last or not. There allow doing less full iterations over the whole
malloc pool.

Malloc is still unbearably slow and I will have to write a proper
fast malloc at some point. With this patch running aoc2023/day12 is
atleast possible. Probabaly will take closer to an hour...
2023-12-14 15:31:00 +02:00
Bananymous 48096b18c2 LibC: mmap returns MAP_FAILED instead of NULL 2023-09-29 10:38:08 +03:00
Bananymous 15cd59b8ce LibC: Fix a bug in malloc
You could not allocate with size equal to one of the pool sizes.
2023-09-28 21:05:27 +03:00
Bananymous 6bb2c80bdd Kernel/LibC: userspace malloc now uses mmap to get memory
We could remove syscalls to allocate more memory. This was not
something the kernel should have done.
2023-09-23 02:26:23 +03:00