[haiku-gsoc] Re: Implementation Queries

  • From: François Revol <revol@xxxxxxx>
  • To: haiku-gsoc@xxxxxxxxxxxxx
  • Date: Wed, 28 Jun 2017 14:36:54 +0200

Le 28/06/2017 à 14:28, Hamish Morrison a écrit :

On Wed, Jun 28, 2017 at 12:46 PM, Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> wrote:
But if there is a flag called CONTIGUOUS_MEMORY, the software that does not
specify it, and rely on the memory block being contiguous, is buggy.

That's the thing - I don't think there is a flag - so it's hard to
tell which users of it actually need contiguous memory and which users
are just using it as a general allocation function.

The problem is kmalloc only allocates contiguous memory, and doesn't
have a flag asking otherwise, which is indeed silly:

https://www.kernel.org/doc/htmldocs/kernel-api/API-kmalloc.html
http://www.makelinux.net/ldd3/chp-8-sect-1

kzalloc is only passing the flags to kmalloc.

Maybe we could try only doing so for GFP_DMA, but that's risky.

François.

Other related posts: