* Cleanup, no functional change.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39438 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2010-11-15 19:35:43 +00:00
parent 55a54abc90
commit da6b5d6d3f
3 changed files with 28 additions and 25 deletions

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2001-2009, Haiku, Inc. * Copyright 2001-2010, Haiku, Inc.
* Distributed under the terms of the MIT license. * Distributed under the terms of the MIT license.
* *
* Authors: * Authors:
@ -105,11 +105,11 @@ detect_simd()
// #pragma mark - // #pragma mark -
/*! /*! \brief Constructor
\brief Constructor
This loads the default fonts, allocates all the major global variables, spawns the main housekeeping This loads the default fonts, allocates all the major global variables,
threads, loads user preferences for the UI and decorator, and allocates various locks. spawns the main housekeeping threads, loads user preferences for the UI
and decorator, and allocates various locks.
*/ */
AppServer::AppServer() AppServer::AppServer()
: :

View File

@ -1,13 +1,13 @@
/* /*
* Copyright 2006-2007, Haiku, Inc. All Rights Reserved. * Copyright 2006-2010, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
* *
* Authors: * Authors:
* Axel Dörfler, axeld@pinc-software.de * Axel Dörfler, axeld@pinc-software.de
*/ */
/*!
This class manages a pool of areas for one client. The client is supposed /*! This class manages a pool of areas for one client. The client is supposed
to clone these areas into its own address space to access the data. to clone these areas into its own address space to access the data.
This mechanism is only used for bitmaps for far. This mechanism is only used for bitmaps for far.

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2006, Haiku, Inc. All Rights Reserved. * Copyright 2006-2010, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License. * Distributed under the terms of the MIT License.
* *
* Authors: * Authors:
@ -35,28 +35,31 @@ typedef DoublyLinkedList<chunk> chunk_list;
class ClientMemoryAllocator { class ClientMemoryAllocator {
public: public:
ClientMemoryAllocator(ServerApp* application); ClientMemoryAllocator(ServerApp* application);
~ClientMemoryAllocator(); ~ClientMemoryAllocator();
status_t InitCheck(); status_t InitCheck();
void *Allocate(size_t size, void** _address, bool& newArea); void* Allocate(size_t size, void** _address,
void Free(void* cookie); bool& newArea);
void Free(void* cookie);
area_id Area(void* cookie); area_id Area(void* cookie);
uint32 AreaOffset(void* cookie); uint32 AreaOffset(void* cookie);
bool Lock(); bool Lock();
void Unlock(); void Unlock();
private: private:
struct block *_AllocateChunk(size_t size, bool& newArea); struct block* _AllocateChunk(size_t size, bool& newArea);
ServerApp* fApplication; private:
MultiLocker fLock; ServerApp* fApplication;
chunk_list fChunks; MultiLocker fLock;
block_list fFreeBlocks; chunk_list fChunks;
block_list fFreeBlocks;
}; };
#endif /* CLIENT_MEMORY_ALLOCATOR_H */ #endif /* CLIENT_MEMORY_ALLOCATOR_H */