UtilsLite
Utilities for C++ programming
Loading...
Searching...
No Matches
Memory Allocation Utilities

Custom memory management and optimization utilities. More...

Classes

class  Utils::Malloc< T >
 Class for dynamic memory allocation of objects. More...
 
class  Utils::MallocFixed< T, mem_size >
 Class for fixed-size memory allocation of objects. More...
 

Functions

string Utils::out_bytes (size_t nb)
 Utility function to convert byte size into a human-readable format.
 

Variables

std::mutex Utils::MallocMutex
 Global mutex for thread-safe memory operations.
 
int64_t Utils::CountAlloc
 Global variables for tracking memory allocation statistics.
 
int64_t Utils::CountFreed
 
int64_t Utils::AllocatedBytes
 
int64_t Utils::MaximumAllocatedBytes
 
bool Utils::MallocDebug
 

Detailed Description

Custom memory management and optimization utilities.

This module offers specialized classes and functions for handling memory allocation, deallocation, and optimization in performance-critical applications. It provides fine-grained control over memory management to ensure efficient use of resources, including custom allocators and techniques for reducing memory fragmentation.

Function Documentation

◆ out_bytes()

string Utils::out_bytes ( size_t nb)

Utility function to convert byte size into a human-readable format.

Parameters
nbThe number of bytes.
Returns
A string representing the size in human-readable format (KB, MB, etc.).

Variable Documentation

◆ AllocatedBytes

int64_t Utils::AllocatedBytes
extern

◆ CountAlloc

int64_t Utils::CountAlloc
extern

Global variables for tracking memory allocation statistics.

◆ CountFreed

int64_t Utils::CountFreed
extern

◆ MallocDebug

bool Utils::MallocDebug
extern

◆ MallocMutex

std::mutex Utils::MallocMutex
extern

Global mutex for thread-safe memory operations.

◆ MaximumAllocatedBytes

int64_t Utils::MaximumAllocatedBytes
extern