#
8844a67e |
|
10-Dec-2018 |
Augustin Cavalier <waddlesplash@gmail.com> |
More trivial syntax and logic cleanup. Spotted by Clang. No functional change intended.
|
#
c73d1301 |
|
08-Nov-2015 |
Michael Lotz <mmlr@mlotz.ch> |
kernel: Use anonymous namespaces to avoid type collisions. The anonymous namespace makes type definitions local to the translation unit (like static does for objects). For pretty much any type not shared across multiple files this is what one wants to happen (and might erroneously expect to happen automatically). This commit solves some actual collisions that were present: * The VFS and the rootfs both used an incompatible VnodeHash struct for their BOpenHashTable. * XSI semaphores and message queues both used queued_thread, Ipc and IpcHashTableDefinition. For release builds these did not cause problems as the types were fully inlined. Debug builds would crash at boot however because parts of a BOpenHashTable<VnodeHash> from the rootfs meant to operate on struct rootfs_vnode would be applied to one from the VFS expecting struct vnode. As such collisions are violations of the one definition rule, the code is at fault and unfortunatley the compiler isn't required to diagnose such problems across translation units (which isn't actually trivial). This can lead to subtle and hard to debug problems and it's therefore best to avoid leaking types into the global namespace whenever possible.
|
#
7bf85edf |
|
30-Nov-2013 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Allow disabling ASLR via DISABLE_ASLR environment variable * VMAddressSpace: Add randomizingEnabled property. * VMUserAddressSpace: Randomize addresses only when randomizingEnabled property is set. * create_team_arg(): Check, if the team's environment contains "DISABLE_ASLR=1". Set the team's address space property randomizingEnabled accordingly in load_image_internal() and exec_team().
|
#
c3f0fd28 |
|
12-Jul-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Fixed formatting of output in some debugger commands. Currently all debugger commands assume 32-bit pointers when formatting their output. This means that on x86_64 the output is incorrectly formatted. Fixed this by adding a B_PRINTF_POINTER_WIDTH definition (16 on 64-bit, 8 on 32-bit), and using this to correctly format the output. Not all commands have been fixed yet, but all VM, slab, VFS, team, thread and image commands should be correct.
|
#
11d35d1b |
|
05-Jul-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Fixed tracing printf formats in VM code.
|
#
4535495d |
|
10-Jan-2011 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Merged the signals branch into trunk, with these changes: * The team and thread kernel structures have been renamed to Team and Thread respectively and moved into the new BKernel namespace. * Several (kernel add-on) sources have been converted from C to C++ since private kernel headers are included that are no longer C compatible. Changes after merging: * Fixed gcc 2 build (warnings mainly in the scary firewire bus manager). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40196 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
4795b05a |
|
18-Oct-2010 |
Ithamar R. Adema <ithamar.adema@team-embedded.nl> |
* Fixup trace message git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39001 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
0d46b365 |
|
14-Jun-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
VMAddressSpace::_DumpListCommand(): Sum up also null-cache areas. Those are used e.g. by the slab allocator. The interesting part is the address space usage anyway. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37139 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
1ba89e67 |
|
05-Jun-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Removed no-op VMTranslationMap::InitPostSem() and VMAddressSpace::InitPostSem(). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37025 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
a34e7d0e |
|
16-Apr-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Set fTranslationMap to NULL in the constructor. Otherwise an error in Create() could cause the destructor to crash. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36329 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
09418c86 |
|
13-Apr-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Added DebugGet() method for use in the kernel debugger. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36227 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
deee8524 |
|
26-Jan-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Introduced {malloc,memalign,free}_etc() which take an additional "flags" argument. They replace the previous special-purpose allocation functions (malloc_nogrow(), vip_io_request_malloc()). * Moved the I/O VIP heap to heap.cpp accordingly. * Added quite a bit of passing around of allocation flags in the VM, particularly in the VM*AddressSpace classes. * Fixed IOBuffer::GetNextVirtualVec(): It was ignoring the VIP flag and always allocated on the normal heap. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35316 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f082f7f0 |
|
15-Jan-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Added vm_page::accessed flag. Works analogously to vm_page::modified. * Reorganized the code for [un]mapping pages: - Added new VMTranslationMap::Unmap{Area,Page[s]}() which essentially do what vm_unmap_page[s]() did before, just in the architecture specific code, which allows for specific optimizations. UnmapArea() is for the special case that the complete area is unmapped. Particularly in case the address space is deleted, some work can be saved. Several TODOs could be slain. - Since they are only used within vm.cpp vm_map_page() and vm_unmap_page[s]() are now static and have lost their prefix (and the "preserveModified" parameter). * Added VMTranslationMap::Protect{Page,Area}(). They are just inline wrappers for Protect(). * X86VMTranslationMap::Protect(): Make sure not to accidentally clear the accessed/dirty flags. * X86VMTranslationMap::Unmap()/Protect(): Make page table skipping actually work. It was only skipping to the next page. * Adjusted the PPC code to at least compile. No measurable effect for the -j8 Haiku image build time, though the kernel time drops minimally. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35089 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
bcc2c157 |
|
13-Jan-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Refactored vm_translation_map: * Pulled the physical page mapping functions out of vm_translation_map into a new interface VMPhysicalPageMapper. * Renamed vm_translation_map to VMTranslationMap and made it a proper C++ class. The functions in the operations vector have become methods. * Added class GenericVMPhysicalPageMapper implementing VMPhysicalPageMapper as far as possible (without actually writing new code). * Adjusted the x86 and the PPC specifics accordingly (untested for the latter). For the other architectures the build is, I'm afraid, seriously broken. The next steps will modify and extend the VMTranslationMap interface, so that it will be possible to fix the bugs in vm_unmap_page[s]() and employ architecture specific optimizations. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35066 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
509f1174 |
|
09-Jan-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Added Size() method. * Added Debug{First,Next}() methods to allow easy iteration through the address spaces in kernel debugger commands. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34978 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
8ab820f0 |
|
07-Jan-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
VMAddressSpace::Put() is too hot to always write lock the address spaces table. It is now inline and uses double-checked locking. This reduces the contention on the lock to insignificant. Total -j8 Haiku image build speedup is marginal, but the total kernel time drops 12%. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34934 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
be7328a9 |
|
07-Dec-2009 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Moved VMCache related definitions to <vm/VMCache.h>. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34535 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
40cd019e |
|
06-Dec-2009 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Renamed VMAddressSpace::ResizeArea{Head,Tail}() to ShrinkArea{Head,Tail}() to clarify that they never enlarge the area. * Reimplemented VMKernelAddressSpace. It is somewhat inspired by Bonwick's vmem resource allocator (though we have different requirements): - We consider the complete address space to be divided into contiguous ranges of type free, reserved, or area, each range being represented by a VMKernelAddressRange object. - The range objects are managed in an AVL tree and a doubly linked list (the latter only for faster iteration) sorted by address. This provides O(log(n)) lookup, insertion and removal. - For each power of two size we maintain a list of free ranges of at least that size. Thus for the most common case of B_ANY*_ADDRESS area allocation, we find a free range in constant time (the rest of the processing being O(log(n))) with a rather good fit. This should also help avoiding address space fragmentation. While the new implementation should be faster, particularly with an increasing number of areas, I couldn't measure any difference in the -j2 haiku build. From a cursory test the -j8 build hasn't tangibly benefitted either. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34528 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
e2518ddb |
|
04-Dec-2009 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Made VMAddressSpace an abstract base class and moved the area management into new derived classes VM{Kernel,User}AddressSpace. Currently those are identical, but that will change. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34492 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
38a97b2c |
|
04-Dec-2009 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Moved all knowledge of reserved areas from vm.cpp to VMAddressSpace. It's a pure address space feature, so it should be handled there. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34491 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f69032f2 |
|
03-Dec-2009 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Added VMAddressSpace::ResizeArea{Head,Tail}() to adjust an area's base and size. * Made VMArea::Set{Base,Size}() private and made VMAddressSpace a friend. In vm.cpp the new VMAddressSpace::ResizeArea{Head,Tail}() are used instead. Finally all address space changes happen in VMAddressSpace only. *phew* Now it's ready to be thoroughly butchered. :-) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34467 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
bbd97b4b |
|
03-Dec-2009 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Made the VMArea fields base and size private and added accessors instead. This makes it more explicit where the fields are modified. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34464 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
35d94001 |
|
02-Dec-2009 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Changed the address space area list to doubly linked. The reason is to simplify migration of the area management, but as a side effect, it also makes area deletion O(1) (instead of O(n), n == number of areas in the address space). * Moved more area management functionality from vm.cpp to VMAddressSpace and VMArea structure creation to VMArea. Made the list and list link members itself private. * VMAddressSpace tracks its amount of free space, now. This also replaces the previous mechanism to do that only for the kernel address space. It was broken anyway, since delete_area() subtracted the area size instead of adding it. * vm_free_unused_boot_loader_range(): - lastEnd could be set to a value < start, which could cause memory outside of the given range to be unmapped. Haven't checked whether this could happen in practice -- if so, it would be seriously unhealthy. - The range between the end of the last area in the range and the end of the range would never be freed. - Fixed potential integer overflows when computing addresses. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34459 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f34a1dd5 |
|
02-Dec-2009 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Created VMArea.{h,cpp} and moved VMArea and the global area hash table (new class VMAreaHash) there. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34450 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
e50cf876 |
|
02-Dec-2009 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Moved the VM headers into subdirectory vm/. * Renamed vm_cache.h/vm_address_space.h to VMCache.h/VMAddressSpace. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34449 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
7bf85edf58b140433802e19e992d32f0a824b702 |
|
30-Nov-2013 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Allow disabling ASLR via DISABLE_ASLR environment variable * VMAddressSpace: Add randomizingEnabled property. * VMUserAddressSpace: Randomize addresses only when randomizingEnabled property is set. * create_team_arg(): Check, if the team's environment contains "DISABLE_ASLR=1". Set the team's address space property randomizingEnabled accordingly in load_image_internal() and exec_team().
|
#
c3f0fd28cda13d70a8c092003609442e4e29cf78 |
|
12-Jul-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Fixed formatting of output in some debugger commands. Currently all debugger commands assume 32-bit pointers when formatting their output. This means that on x86_64 the output is incorrectly formatted. Fixed this by adding a B_PRINTF_POINTER_WIDTH definition (16 on 64-bit, 8 on 32-bit), and using this to correctly format the output. Not all commands have been fixed yet, but all VM, slab, VFS, team, thread and image commands should be correct.
|
#
11d35d1b9b453cf95392b2ae8fa0941266e85d78 |
|
05-Jul-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Fixed tracing printf formats in VM code.
|
#
4535495d80c86e19e2610e7444a4fcefe3e0f8e6 |
|
10-Jan-2011 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Merged the signals branch into trunk, with these changes: * The team and thread kernel structures have been renamed to Team and Thread respectively and moved into the new BKernel namespace. * Several (kernel add-on) sources have been converted from C to C++ since private kernel headers are included that are no longer C compatible. Changes after merging: * Fixed gcc 2 build (warnings mainly in the scary firewire bus manager). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40196 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
4795b05a888ed9f57f4a7fe84a7bef6ecefef004 |
|
18-Oct-2010 |
Ithamar R. Adema <ithamar.adema@team-embedded.nl> |
* Fixup trace message git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39001 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
0d46b36584d6b0259b76f9ce1454acb80567d313 |
|
14-Jun-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
VMAddressSpace::_DumpListCommand(): Sum up also null-cache areas. Those are used e.g. by the slab allocator. The interesting part is the address space usage anyway. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37139 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
1ba89e67eda21e7ad9e1ec57a53ae0a3436b8721 |
|
05-Jun-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Removed no-op VMTranslationMap::InitPostSem() and VMAddressSpace::InitPostSem(). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37025 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
a34e7d0ec48df4ed9467d9e111b2ab1644918ff6 |
|
16-Apr-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Set fTranslationMap to NULL in the constructor. Otherwise an error in Create() could cause the destructor to crash. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36329 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
09418c869bf79427b822ebf0f11b14938ec8154b |
|
13-Apr-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Added DebugGet() method for use in the kernel debugger. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36227 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
deee8524b7534d9b586cbcbf366d0660c9769a8e |
|
26-Jan-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Introduced {malloc,memalign,free}_etc() which take an additional "flags" argument. They replace the previous special-purpose allocation functions (malloc_nogrow(), vip_io_request_malloc()). * Moved the I/O VIP heap to heap.cpp accordingly. * Added quite a bit of passing around of allocation flags in the VM, particularly in the VM*AddressSpace classes. * Fixed IOBuffer::GetNextVirtualVec(): It was ignoring the VIP flag and always allocated on the normal heap. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35316 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f082f7f019941732f1d2b99f627fbeeeec3746af |
|
15-Jan-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Added vm_page::accessed flag. Works analogously to vm_page::modified. * Reorganized the code for [un]mapping pages: - Added new VMTranslationMap::Unmap{Area,Page[s]}() which essentially do what vm_unmap_page[s]() did before, just in the architecture specific code, which allows for specific optimizations. UnmapArea() is for the special case that the complete area is unmapped. Particularly in case the address space is deleted, some work can be saved. Several TODOs could be slain. - Since they are only used within vm.cpp vm_map_page() and vm_unmap_page[s]() are now static and have lost their prefix (and the "preserveModified" parameter). * Added VMTranslationMap::Protect{Page,Area}(). They are just inline wrappers for Protect(). * X86VMTranslationMap::Protect(): Make sure not to accidentally clear the accessed/dirty flags. * X86VMTranslationMap::Unmap()/Protect(): Make page table skipping actually work. It was only skipping to the next page. * Adjusted the PPC code to at least compile. No measurable effect for the -j8 Haiku image build time, though the kernel time drops minimally. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35089 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
bcc2c157a1c54f5169de1e7a3e32c49e92bbe0aa |
|
13-Jan-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Refactored vm_translation_map: * Pulled the physical page mapping functions out of vm_translation_map into a new interface VMPhysicalPageMapper. * Renamed vm_translation_map to VMTranslationMap and made it a proper C++ class. The functions in the operations vector have become methods. * Added class GenericVMPhysicalPageMapper implementing VMPhysicalPageMapper as far as possible (without actually writing new code). * Adjusted the x86 and the PPC specifics accordingly (untested for the latter). For the other architectures the build is, I'm afraid, seriously broken. The next steps will modify and extend the VMTranslationMap interface, so that it will be possible to fix the bugs in vm_unmap_page[s]() and employ architecture specific optimizations. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35066 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
509f1174ce3473701df0b73219f420b69d0954f9 |
|
09-Jan-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Added Size() method. * Added Debug{First,Next}() methods to allow easy iteration through the address spaces in kernel debugger commands. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34978 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
8ab820f076cad39859a9a674b44fd82f1abfb88b |
|
07-Jan-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
VMAddressSpace::Put() is too hot to always write lock the address spaces table. It is now inline and uses double-checked locking. This reduces the contention on the lock to insignificant. Total -j8 Haiku image build speedup is marginal, but the total kernel time drops 12%. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34934 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
be7328a9f6b3c55eec71d403a0367d80fd4ebd12 |
|
07-Dec-2009 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Moved VMCache related definitions to <vm/VMCache.h>. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34535 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
40cd019ea0415011db2a82c736e716a22ca842cc |
|
06-Dec-2009 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Renamed VMAddressSpace::ResizeArea{Head,Tail}() to ShrinkArea{Head,Tail}() to clarify that they never enlarge the area. * Reimplemented VMKernelAddressSpace. It is somewhat inspired by Bonwick's vmem resource allocator (though we have different requirements): - We consider the complete address space to be divided into contiguous ranges of type free, reserved, or area, each range being represented by a VMKernelAddressRange object. - The range objects are managed in an AVL tree and a doubly linked list (the latter only for faster iteration) sorted by address. This provides O(log(n)) lookup, insertion and removal. - For each power of two size we maintain a list of free ranges of at least that size. Thus for the most common case of B_ANY*_ADDRESS area allocation, we find a free range in constant time (the rest of the processing being O(log(n))) with a rather good fit. This should also help avoiding address space fragmentation. While the new implementation should be faster, particularly with an increasing number of areas, I couldn't measure any difference in the -j2 haiku build. From a cursory test the -j8 build hasn't tangibly benefitted either. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34528 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
e2518ddbb14677f379b8dc8f66088473c553b113 |
|
04-Dec-2009 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Made VMAddressSpace an abstract base class and moved the area management into new derived classes VM{Kernel,User}AddressSpace. Currently those are identical, but that will change. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34492 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
38a97b2c36a42758a143aef034e0a3fc70440934 |
|
04-Dec-2009 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Moved all knowledge of reserved areas from vm.cpp to VMAddressSpace. It's a pure address space feature, so it should be handled there. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34491 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f69032f22b9fdf7ea2a3287e162abe39882ce373 |
|
03-Dec-2009 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Added VMAddressSpace::ResizeArea{Head,Tail}() to adjust an area's base and size. * Made VMArea::Set{Base,Size}() private and made VMAddressSpace a friend. In vm.cpp the new VMAddressSpace::ResizeArea{Head,Tail}() are used instead. Finally all address space changes happen in VMAddressSpace only. *phew* Now it's ready to be thoroughly butchered. :-) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34467 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
bbd97b4bb41cc03735528962ff53d89a2a2d7ff2 |
|
03-Dec-2009 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Made the VMArea fields base and size private and added accessors instead. This makes it more explicit where the fields are modified. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34464 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
35d940014e100b8ca09eaf294b86fb9ef905b1e0 |
|
02-Dec-2009 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Changed the address space area list to doubly linked. The reason is to simplify migration of the area management, but as a side effect, it also makes area deletion O(1) (instead of O(n), n == number of areas in the address space). * Moved more area management functionality from vm.cpp to VMAddressSpace and VMArea structure creation to VMArea. Made the list and list link members itself private. * VMAddressSpace tracks its amount of free space, now. This also replaces the previous mechanism to do that only for the kernel address space. It was broken anyway, since delete_area() subtracted the area size instead of adding it. * vm_free_unused_boot_loader_range(): - lastEnd could be set to a value < start, which could cause memory outside of the given range to be unmapped. Haven't checked whether this could happen in practice -- if so, it would be seriously unhealthy. - The range between the end of the last area in the range and the end of the range would never be freed. - Fixed potential integer overflows when computing addresses. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34459 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f34a1dd5d701373687b6f3f0e6e76bd2b1ae6007 |
|
02-Dec-2009 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Created VMArea.{h,cpp} and moved VMArea and the global area hash table (new class VMAreaHash) there. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34450 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
e50cf8765be50a7454c9488db38b638cf90805af |
|
02-Dec-2009 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Moved the VM headers into subdirectory vm/. * Renamed vm_cache.h/vm_address_space.h to VMCache.h/VMAddressSpace. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34449 a95241bf-73f2-0310-859d-f6bbb57e9c96
|