[haiku-commits] Re: haiku: hrev46463 - src/system/kernel/vm src/system/kernel headers/private/kernel/vm

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 02 Dec 2013 15:42:30 +0100

On 12/01/2013 06:34 PM, Pawel Dziepak wrote:
2013/12/1 Ingo Weinhold <ingo_weinhold@xxxxxx>:
You're right wrt. B_ANY_ADDRESS_DETERMINISTIC. When the caller isn't
interested in a specific address anyway, it can as well be randomized.
B_BASE_ADDRESS_DETERMINISTIC, however, does make sense when used for
optimization purposes (e.g. if an adjoining allocation is preferred).

I see your point. "B_BASE_ADDRESS_DETERMINISTIC" may be a bit
misleading name though. Also, if an area can't be created at the
requested address then there is nothing that prevents it from being
placed at randomized location. It could be something like
B_TRY_EXACT_ADDRESS (I'm not very good at these names).

I was thinking *_DETERMINISTIC, since the algorithm determining the address would be deterministic. I.e. if I delete the area and create it again with the same arguments, I'd get the same address.

Something like B_TRY_EXACT_ADDRESS or B_PREFER_EXACT_ADDRESS sounds good as name in general, but it wouldn't convey the fact that the algorithm would use the given address as a base address, i.e. return the closest available address at or after the given address (if any).

CU, Ingo


Other related posts: