bmarcot / vega

vega -- The Unix-like Operating System for micro-controllers (ARM Cortex-M4)
6 stars 1 forks source link

Change the physical-page allocator #18

Closed bmarcot closed 7 years ago

bmarcot commented 7 years ago

The current algorithm uses ucontext and a coroutine doing recursion to split and coalesce pages, see https://github.com/bmarcot/vega/blob/devel/kernel/mm.c#L80

Change that algoritm to an iterative algorithm that can work with a smaller kernel stack.

bmarcot commented 7 years ago

See https://books.google.no/books?id=9yIEji1UheIC&pg=PA234&lpg=PA234&dq=struct+free_area_struct&source=bl&ots=JEmFtolSNW&sig=y4XXX8_kayJcrRLm9DphTsJT9oM&hl=en&sa=X&ved=0ahUKEwjiuOfkyMrOAhUoDJoKHYo7CO8Q6AEIOTAF#v=onepage&q=struct%20free_area_struct&f=false

bmarcot commented 7 years ago

Fixed in 3b86675c63113f8fbec3e0fcf757f98da664dcfd