Mission statement : memory management extension


Allow the construction and the use of memory objects wider than 4 Mb, build tests for such memory objects. Rather than directly modifying the pager code, the modifications should be carried out in pager-II module, mainly at the cluster and the page table interface.

The "zone" interface is targetted for allocation of memory within a page table, so it shouldn't be modified by this mission.


page clusters
the cluster interface has been defined to allow a memory class to deal with areas of virtual memory wider than 4Mb, however, if the actual system allows one to allocate more than 4Mb out of one cluster, there is nothing that let the client get a zone larger than 4Mb by one allocation function (i.e. if your cluster is 16Mb wide, the most you can get is 4 blocks of 4 Mb, trying to allocate a 8Mb block will fail :(

  • Provided that we can allocate several contiguous tables at once, extends the "zone" interface by splitting a request into complete tables allocation and zone allocation within other tables. This will require the ability of allocate memory at a given address from the "zone" interface.

page tables & cluster regions.
In the current kernel & pager II module, pages tables can't be allocated in group. The "cluster region" feature partially solves this problem by allocating group of page tables provided that the requester knows the range of addresses it needs.
  • The semantic "region base = -1 for automatic base selection" actually doesn't work.
  • The page directory should receive a "zone allocation" algorithm as we have for page tables, so that we can simply ask for "3x4Mb" and receive 3 contiguous page tables

pinned allocation
Modules loading can be boosted if the relocation step can be skipped. This requires the ability for the microkernel to find a free zone that would be at a given address.
  • Update LostZone memory manager (in microkernel) so that it supports the search of a free zone covering a given address and return it.
  • extends blocman memory manager (in microkernel too) so that, when it receives an extended-allocation command with KMEM_PINNED, it can look (using lostzone) for the corresponding free zone, check its size and free the exceeding header and trailer (keeping only the requested size from the requested address)
  • give the extended system heap the KMEM_PINNED flag
Provide a new module that will check all the previous feature are working properly.