SharedBuffer.cpp File Reference

#include <support/SharedBuffer.h>
#include <support/StdIO.h>
#include <support/ITextStream.h>
#include <support_p/SupportMisc.h>
#include <ErrorMgr.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

Defines

#define ALIGN_SIZE(x)   ((size_t(x)+(MALLOC_ALIGN-1))&(~(MALLOC_ALIGN-1)))
#define BUFFER_SIZE   32
#define MALLOC_ALIGN   8
#define PRINT_POOL_METRICS   0
#define USED_SIZE(x)   (8+sizeof(SSharedBuffer)+ALIGN_SIZE(x))

Functions

void __terminate_shared_buffer (void)
bool add_to_pool (const SSharedBuffer *buffer, size_t pos)
size_t align_buffer (size_t size)
bool find_in_pool (const SSharedBuffer *buffer, size_t *pos)
void remove_from_pool (size_t pos)


Define Documentation

#define ALIGN_SIZE  )     ((size_t(x)+(MALLOC_ALIGN-1))&(~(MALLOC_ALIGN-1)))
 

#define BUFFER_SIZE   32
 

#define MALLOC_ALIGN   8
 

#define PRINT_POOL_METRICS   0
 

#define USED_SIZE  )     (8+sizeof(SSharedBuffer)+ALIGN_SIZE(x))
 


Function Documentation

void __terminate_shared_buffer void   ) 
 

bool add_to_pool const SSharedBuffer buffer,
size_t  pos
 

size_t align_buffer size_t  size  )  [inline]
 

bool find_in_pool const SSharedBuffer buffer,
size_t *  pos
 

void remove_from_pool size_t  pos  )