[haiku-gsoc] Re: Implementation Queries

  • From: "Adrien Destugues" <pulkomandy@xxxxxxxxxxxxx>
  • To: haiku-gsoc@xxxxxxxxxxxxx
  • Date: Wed, 28 Jun 2017 10:51:13 +0000

28 juin 2017 11:25 "Vivek Roy" <vivekroyandroid@xxxxxxxxx> a écrit:

Depending on how the alloc/free behaviour is in the code to be ported, a 
simple provisional
allocator could be added (temporarily), i.e. create a larger area of 
contiguous memory and hand out
pieces of it.

So, I need to have a provision which will allocate one page at a time (or 
multiple pages) and then
give away segments of the page to each kmalloc call.

You can't allocate one page at a time for this. You need to allocate one big 
chunk of contiguous memory.

If you allocate only one page at a time, you can't guarantee that they are 
contiguous. Maybe someone allocated a page just next to yours.

Having something like that will ease the process a lot in the coming months, 
but will be some work
for now. Is that what everyone thinks would be the way to go?

I think writing code to get DRM to run on Haiku is exactly what you should be 
doing during the summer? It's expected that it starts with low level code like 
this, and then build up over time to more high level problems. 

-- 
Adrien.

Other related posts: