* Fix the TimeFormat API, there was a double free. Make it work as expected : you send it a number of seconds and it will format it properly in days, hours, minutes, seconds with proper plural.
* Cleanup other parts of the Format API from useless things. They may get reintroduced later if we feel the need to do so.
* AboutSystem now use TimeFormat to display the uptime in properly localized way.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35506 a95241bf-73f2-0310-859d-f6bbb57e9c96
arch_timer_set_hardware_timer(). This was harmless, at least with our
current x86 timers implementation, since they checked for minimum timeouts.
Very small cleanup (now that the file is compiled as C++).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35505 a95241bf-73f2-0310-859d-f6bbb57e9c96
-Added a very simple test that shows the API is corrupting memory and ends up crashing
-Fixed build of other locale tests
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35503 a95241bf-73f2-0310-859d-f6bbb57e9c96
good catch, Matt!
* This closes at least a part of ticket #4844.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35502 a95241bf-73f2-0310-859d-f6bbb57e9c96
particular it wouldn't set the flag when writing something to a page, but
only move it to the modified queue. Since mapping the page would move it to
another queue, the information that the page was modified would be lost and
it would never be written to disk. Was well reproducible with a Haiku image
build and limited amount of memory.
Fixes the hopefully last remaining cause for #5374.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35500 a95241bf-73f2-0310-859d-f6bbb57e9c96
* full_scan_inactive_pages(): Fixed syntactical glitch (missing "else").
Affected only the active paging mode and was relatively harmless. The worst
case would be that an inactive page would be moved to the cached queue
although its usage_count hadn't dropped to 0 yet, thus freeing it before
pages that deserved it more.
* move_page_to_active_or_inactive_queue():
- Was ignoring the page's modified flag, thus potentially moving a modified
page to the cached queue. That could happen only in rare cases though,
like when the page was still mmap()ped while being written and modified and
unmapped before being done.
- No longer move the page to the inactive queue, even if its usage count is 0.
In idle mode the page daemon doesn't look at inactive pages, so the page's
stats wouldn't be updated anymore.
- Renamed to move_page_to_appropriate_queue().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35499 a95241bf-73f2-0310-859d-f6bbb57e9c96
inactive pages to the active queue. This has the advantage that the page
daemon will keep track of those pages even in idle mode (where it only
processes the active queue).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35498 a95241bf-73f2-0310-859d-f6bbb57e9c96
block_cache_discard() use the BlockWriter directly as well.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35496 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Added new KDL command "cached_block" that dumps a cached block.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35493 a95241bf-73f2-0310-859d-f6bbb57e9c96
That costs 12 more bytes per inode on 32 bit platforms, though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35491 a95241bf-73f2-0310-859d-f6bbb57e9c96
Unset() the header in Allocate() before calling it. This fixes bug #5410.
* CachedNode::Allocate() does not need to revert its changes; the transaction
will take care of that. However, BPlusTree::fHeader is currently not correctly
maintained if a transaction fails (working on that now).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35490 a95241bf-73f2-0310-859d-f6bbb57e9c96
to make the guard page inaccessible. Thanks Ingo for the pointer!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35488 a95241bf-73f2-0310-859d-f6bbb57e9c96
* vm_page_write_modified_page_range(): Need to DEBUG_PAGE_ACCESS_END() a bit
later.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35487 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Use the same criterion when to write back temporary pages as the page daemon.
* Move wired and temporary pages that shall not be written back to the active or
inactive queue so they don't get stuck in the modified queue and potentially
cause the page writer to run permanently without actually making progress
(#5382).
page writing implementation:
* If writing back a temporary page failed, move it back to the inactive or
active queue, so it doesn't get stuck in the modified queue. If active paging
continues, it might find its way back to the modified queue in the next
iteration, but that improves the situation a bit at least. Particularly with
the port heap pages not really being swappable ATM.
* Never dequeue pages from the modified queue. We mark them busy, so the page
writer will skip them anyway. This allows others to play with the page to some
extend (at least allowing to move it between the queues). This fixes#5404.
* Removed PageWriteWrapper::ClearModifiedFlag(). We clear the modified flag in
PageWriteWrapper::SetTo(), now, so that the page writer doesn't need to do
that explicitly either.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35485 a95241bf-73f2-0310-859d-f6bbb57e9c96
the heap debug panics. Instead syslog output is generated if turned off.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35481 a95241bf-73f2-0310-859d-f6bbb57e9c96
well as the thread allocating it. Can for example be used to verify that an
object or buffer is as large as expected.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35480 a95241bf-73f2-0310-859d-f6bbb57e9c96
keeping all returned heap memory in the 0xdeadbeef state (including the
first sizeof(void *) bytes otherwise for the free list). While wasting a lot
of memory it allows you to rely on 0xdeadbeef being always present as no
future allocation will reuse the freed memory block.
* Also added heap_debug_malloc_with_guard_page() which is intended to allocate
a memory block so it is aligned that the start of invalid memory past the
allocation is in an unmapped guard page. However the kernel backend that would
guarantee this is not yet implemented, so right now this works only by chance
if no other area happens to be allocated exactly past the created one. With a
very specifc suspicion you can put that one allocation you get to good use
though. It causes a crash when accessing memory past the allocation size so
you actually get a backtrace from where the access happened instead of only
after freeing/wall checking.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35478 a95241bf-73f2-0310-859d-f6bbb57e9c96
it has been unmapped. This way modified pages could end up in the "cached"
queue without having been written back. That would be a good explanation for
#5374 (partially wrong file contents) -- as soon as such a page was freed,
the invalid on-disk contents would become visible.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35477 a95241bf-73f2-0310-859d-f6bbb57e9c96
so the fallback implementations of UnmapPages() and UnmapArea() need to do
that. Not relevant for x86.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35476 a95241bf-73f2-0310-859d-f6bbb57e9c96
a copy of its structure. CachedNode is only used to write to the header, now.
This should cause the block_cache to no longer have any referenced blocks
outside of any I/O.
* Coding style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35473 a95241bf-73f2-0310-859d-f6bbb57e9c96
are now removed from the maps as soon as the client deletes them. This also
makes the "client reference" mechanism superfluous I introduced earlier.
* ServerApp::SetCurrentCursor() must always call Desktop::SetCursor(), since it
is also called whenever the current application changes. This fixes the cursor
almost never changing.
* Renamed ServerPicture::Usurp()/StepDown() to PushPicture(), and PopPicture().
* Also, they now acquire a reference to the picture in question (ie. the picture
you get from PopPicture() also owns a reference you need to free).
* ServerApp::CreatePicture() may fail, too. This case is now handled in the code
that calls it.
* Previously, the ServerWindow tried to process up to 70 messages in one go.
That obviously caused bug #4709. Now, we have the additional requirement to
not hold the desktop lock for longer than 25 ms. I haven't tested it with
Kaleidoscope yet, though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35472 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Added a few KDL commands to improve your debugging experience.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35469 a95241bf-73f2-0310-859d-f6bbb57e9c96
bytes restriction is only a soft limit. This fixes stalling TCP connections
because everything received would be out of window once this happened.
* Added a TODO to look into TCP's window management - it doesn't seem to be
right.
* Fixed build with tracing turned on.
* Made the fNumber member of tcp_sequence private.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35468 a95241bf-73f2-0310-859d-f6bbb57e9c96
though).
* Added/improved some KDL commands to make the slab easier to work with from
KDL.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35466 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Renamed the "busy" stuff to "busy_reading", and added a "busy_writing"
concept.
* This now allows reading a block (and other blocks), while blocks are written
back. This should speed all operations needing to write back blocks, like
unzipping or compiling.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35464 a95241bf-73f2-0310-859d-f6bbb57e9c96
driver_events (ie. there is now only a single list to walk).
* Also, the DriverWatcher is now maintained using the driver_events.
This fixes bug #5005.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35463 a95241bf-73f2-0310-859d-f6bbb57e9c96
remembered, and a "new" will just continue in this level.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35461 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Removed the test driver from the image; it serves no practical purpose.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35459 a95241bf-73f2-0310-859d-f6bbb57e9c96
we might as well use it. Couldn't see any regressions so far.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35457 a95241bf-73f2-0310-859d-f6bbb57e9c96