Update Support Kit docs, add \since
Also add preliminary documentation for BObjectList.
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
/*
|
||||
* Copyright 2007 Haiku, Inc. All rights reserved.
|
||||
* Copyright 2007-2014 Haiku, Inc. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* Niels Sascha Reedijk, [email protected]
|
||||
* John Scipione, [email protected]
|
||||
*
|
||||
* Proofreading:
|
||||
* David Weizades, [email protected]
|
||||
@@ -15,7 +16,7 @@
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
/*!
|
||||
\file BlockCache.h
|
||||
\ingroup support
|
||||
\ingroup libbe
|
||||
@@ -26,14 +27,18 @@
|
||||
/*!
|
||||
\var B_OBJECT_CACHE
|
||||
\brief Used in the constructor of BBlockCache. Determines that objects will
|
||||
be created using \c new[] and \c delete[].
|
||||
be created using \c new[] and \c delete[].
|
||||
|
||||
\since BeOS R3
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\var B_MALLOC_CACHE
|
||||
\brief Used in the constructor of BBlockCache. Determines that objects will
|
||||
be created using \c malloc() and \c free().
|
||||
be created using \c malloc() and \c free().
|
||||
|
||||
\since BeOS R3
|
||||
*/
|
||||
|
||||
|
||||
@@ -77,6 +82,8 @@
|
||||
Get() will be allocating the objects by itself.
|
||||
|
||||
\note BBlockCache is thread-safe.
|
||||
|
||||
\since BeOS R3
|
||||
*/
|
||||
|
||||
|
||||
@@ -86,11 +93,13 @@
|
||||
\brief Allocate a new memory pool.
|
||||
|
||||
\param blockCount The number of free memory blocks you want to allocate
|
||||
initially. This number is also used as the maximum number of free blocks
|
||||
that will be kept.
|
||||
initially. This number is also used as the maximum number of free
|
||||
blocks that will be kept.
|
||||
\param blockSize The size of the blocks.
|
||||
\param allocationType Either #B_OBJECT_CACHE for using \c new[] and
|
||||
\c delete[] or #B_MALLOC_CACHE for \c malloc() and \c free().
|
||||
\c delete[] or #B_MALLOC_CACHE for \c malloc() and \c free().
|
||||
|
||||
\since BeOS R3
|
||||
*/
|
||||
|
||||
|
||||
@@ -101,11 +110,13 @@
|
||||
Note that the blocks you checked out with Get() and not checked back in with
|
||||
Save() will not be freed, since ownership belongs to you. Make sure you
|
||||
clean up after yourself.
|
||||
|
||||
\since BeOS R3
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn void *BBlockCache::Get(size_t blockSize)
|
||||
\fn void* BBlockCache::Get(size_t blockSize)
|
||||
\brief Get a block from the pool of free blocks.
|
||||
|
||||
If the pool runs out of free blocks, a new one will be allocated. Please
|
||||
@@ -114,13 +125,16 @@
|
||||
Only sizes that match the blocks in the memory pool will come from the pool.
|
||||
|
||||
\param blockSize The required size of the memory block.
|
||||
|
||||
\return Returns a pointer to a memory block, or \c NULL if locking the
|
||||
object failed.
|
||||
object failed.
|
||||
|
||||
\since BeOS R3
|
||||
*/
|
||||
|
||||
|
||||
/*!
|
||||
\fn void BBlockCache::Save(void *pointer, size_t blockSize)
|
||||
\fn void BBlockCache::Save(void* pointer, size_t blockSize)
|
||||
\brief Save a block of memory to the memory pool.
|
||||
|
||||
The block of memory will only be added to the pool if the \c blockSize is
|
||||
@@ -134,4 +148,6 @@
|
||||
were created with \c new[] if the allocation type is #B_OBJECT_CACHE.
|
||||
Likewise, you should only use objects allocated with \c malloc() when the
|
||||
allocation type is #B_MALLOC_CACHE.
|
||||
|
||||
\since BeOS R3
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user