Skip to content

Commit 91efc4b

Browse files
authored
Doc: Add doc for align size
1 parent 32d5eb3 commit 91efc4b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

include/cppcore/Memory/MemUtils.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ namespace cppcore {
3030

3131
#define ALIGN_MASK(value, mask) (((value) + (mask)) & ((~0) & (~(mask))))
3232

33+
/// @brief Will calculate the alignment for the given size
34+
/// @param[in] size he requested size.
35+
/// @return The aligned size.
3336
template<class T>
3437
inline size_t align(size_t n) {
3538
return (n + sizeof(T) - 1) & ~(sizeof(T) - 1);
@@ -47,13 +50,13 @@ class DLL_CPPCORE_EXPORT MemUtils {
4750
/// @param[inout] buffer The buffer to clear.
4851
static void clearMemory(void *buffer, size_t size);
4952

50-
/// @brief Will return true, if the pointer fits into the alignment.
51-
/// @param[in] ptr The pointer to check.
53+
/// @brief Will return true, if the pointer fits into the alignment.
54+
/// @param[in] ptr The pointer to check.
5255
/// @param[in] align The alignment to check for.
5356
/// @return true if aligned, false if not.
5457
static bool isAligned(const void *ptr, size_t align);
5558

56-
/// @brief Will align the given pointer.
59+
/// @brief Will align the given pointer.
5760
/// @param[in] ptr The pointer to align.
5861
/// @param[in] extra Space for headers / meta information.
5962
/// @param[in] align The alignment to check for.

0 commit comments

Comments
 (0)