* Moving some functions around, removing and adding others for the public API.
I've written a blog post at haiku-os.org to go as documentation for this
introducing the API and the other helpful bits.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35431 a95241bf-73f2-0310-859d-f6bbb57e9c96
in r23974, but seeing that it was added to the runtime_loader default paths as
well I take it this was an oversight.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35427 a95241bf-73f2-0310-859d-f6bbb57e9c96
allocated buffers to validate that the full allocated size is actually usable.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35425 a95241bf-73f2-0310-859d-f6bbb57e9c96
the contiguous page allocation function and unlocks a bin locker a bit earlier.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35424 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Make the contiguous page allocation capable of aligning the allocation
and make it more clever by checking up front if there's a chance of getting
enough pages at all, by giving up earlier if the page count can't be fit
anymore, and in the alignment case by only checking the pages which have a
valid alignment.
* If the alignment requirement is > B_PAGE_SIZE we now use page allocation
directly, because the bins aren't necesarily aligned on their size past
B_PAGE_SIZE anymore.
* When doing aligned bin allocation, calculate the aligned size up front and
choose the right heap for the allocation.
* Also when doing aligned bin allocations we not only need to round up the size
but also ensure that the bin we choose is aligned at all.
* Moved adding leak check info into it's own function.
Fixes various misalignment problems when working with alignments > B_PAGE_SIZE
or when using alignments < allocation size. Also the directly aligned page
allocations now only use up as many pages as actually required instead of
allocating based on the rounded up to align size.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35422 a95241bf-73f2-0310-859d-f6bbb57e9c96
* In SetBarHeight(), use InvalidateLayout() when used with layout management.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35418 a95241bf-73f2-0310-859d-f6bbb57e9c96
always behave as if within a transaction. Otherwise all drawing calls to such
BViews wait for the server to finish the request. This change gives a tremendous
speed boost for these situations and is compatibly with BeOS, since there you
also had to call Sync() before drawing a bitmap that was painted with attached
views.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35414 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Reset the DropIndex when the drag is exiting the window.
* Otherwise, the anticipation rect isn't set back on when you enter again the window.
Fixes ticket #3199.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35409 a95241bf-73f2-0310-859d-f6bbb57e9c96
consider that when filling in the text and data ranges of the image info.
This fixes#5361 and #5351, caused by libtracker.so not finding its own
image.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35407 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Don't assume that ids to be contiguous (and to start at 0).
* Use the executable's name as the replicant view name (to ease its identification and removal)
Fixes ticket #5354.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35402 a95241bf-73f2-0310-859d-f6bbb57e9c96
variables in the script and in generated BuildConfig file. Otherwise the
--update option wouldn't correctly pick it up.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35400 a95241bf-73f2-0310-859d-f6bbb57e9c96
doesn't know them. Not sure why that was commented out -- only this way the
build system knows that the libs aren't available. Fixes the non-Haiku build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35397 a95241bf-73f2-0310-859d-f6bbb57e9c96
compiler. Fixes#5322 (the ones in /boot/develop would be overwritten).
* Simplified the Jamfile building these libraries.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35396 a95241bf-73f2-0310-859d-f6bbb57e9c96
going on. I only wanted to have it in the repository in case we decide at a
later point that it is a good idea after all.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35395 a95241bf-73f2-0310-859d-f6bbb57e9c96
its own source file now that the page daemon source file is gone.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35394 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Added vm_clear_page_mapping_accessed_flags() and
vm_remove_all_page_mappings_if_unaccessed(), which combine the functionality
of vm_test_map_activation(), vm_clear_map_flags(), and
vm_remove_all_page_mappings(), thus saving lots of calls to translation map
methods. The backend is the new method
VMTranslationMap::ClearAccessedAndModified().
* Started to make use of the cached page queue and changed the meaning of the
other non-free queues slightly:
- Active queue: Contains mapped pages that have been used recently.
- Inactive queue: Contains mapped pages that have not been used recently. Also
contains unmapped temporary pages.
- Modified queue: Contains unmapped modified pages.
- Cached queue: Contains unmapped unmodified pages (LRU sorted).
Unless we're actually low on memory and actively do paging, modified and
cached queues only contain non-temporary pages. Cached pages are considered
quasi free. They still belong to a cache, but since they are unmodified and
unmapped, they can be freed immediately. And this is what
vm_page_[try_]reserve_pages() do now when there are no more actually free
pages at hand. Essentially this means that pages storing cached file data,
unless mmap()ped, no longer are considered used and don't contribute to page
pressure. Paging will not happen as long there are enough free + cached pages
available.
* Reimplemented the page daemon. It no longer scans all pages, but instead works
the page queues. As long as the free pages situation is harmless, it only
iterates through the active queue and deactivates pages that have not been
used recently. When paging occurs it additionally scans the inactive queue and
frees pages that have not been used recently.
* Changed the page reservation/allocation interface:
vm_page_[try_]reserve_pages(), vm_page_unreserve_pages(), and
vm_page_allocate_page() now take a vm_page_reservation structure pointer.
The reservation functions initialize the structure -- currently consisting
only of a count member for the number of still reserved pages.
vm_page_allocate_page() decrements the count and vm_page_unreserve_pages()
unreserves the remaining pages (if any). Advantages are that reservation/
unreservation mismatches cannot occur anymore, that vm_page_allocate_page()
can verify that the caller has indeed a reserved page left, and that there's
no unnecessary pressure on the free page pool anymore. The only disadvantage
is that the vm_page_reservation object needs to be passed around a bit.
* Reworked the page reservation implementation:
- Got rid of sSystemReservedPages and sPageDeficit. Instead
sUnreservedFreePages now actually contains the number of free pages that
have not yet been reserved (it cannot become negative anymore) and the new
sUnsatisfiedPageReservations contains the number of pages that are still
needed for reservation.
- Threads waiting for reservations do now add themselves to a waiter queue,
which is ordered by descending priority (VM priority and thread priority).
High priority waiters are served first when pages become available.
Fixes#5328.
* cache_prefetch_vnode(): Would reserve one less page than allocated later, if
the size wasn't page aligned.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35393 a95241bf-73f2-0310-859d-f6bbb57e9c96
that does not have a transaction.
* This should fix#5340.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35390 a95241bf-73f2-0310-859d-f6bbb57e9c96
pose list and replaced the rather ugly "fFiltering ? ..." everywhere with it.
* Automatic whitespace cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35389 a95241bf-73f2-0310-859d-f6bbb57e9c96
anymore. Also make that test string a bit more complicated.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35386 a95241bf-73f2-0310-859d-f6bbb57e9c96
be needed in Haiku, one could easily fix that.
* Automatic whitespace cleanup.
* Minor other cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35382 a95241bf-73f2-0310-859d-f6bbb57e9c96