Skip to content

File memory_cwrapper.h

FileList > base > memory_cwrapper.h

Go to the source code of this file

  • #include <string.h>
  • #include <stdlib.h>
  • #include <assert.h>
  • #include "memory_monitor_sr.hpp"
  • #include <malloc.h>

Public Functions

Type Name
void * cub_alloc (size_t size, const char * file, const int line)
void * cub_calloc (size_t num, size_t size, const char * file, const int line)
void cub_free (void * ptr)
void * cub_realloc (void * ptr, size_t size, const char * file, const int line)
char * cub_strdup (const char * str, const char * file, const int line)
size_t get_allocated_size (void * ptr)

Macros

Type Name
define calloc (num, sz) [**cub\_calloc**](memory__cwrapper_8h.md#function-cub_calloc)(num, [**sz**](broker__monitor_8c.md#function-timeout), [**\_\_FILE\_\_**](broker__monitor_8c.md#function-timeout), [**\_\_LINE\_\_**](broker__monitor_8c.md#function-timeout))
define free (ptr) [**cub\_free**](memory__cwrapper_8h.md#function-cub_free)(ptr)
define malloc (sz) [**cub\_alloc**](memory__cwrapper_8h.md#function-cub_alloc)([**sz**](broker__monitor_8c.md#function-timeout), [**\_\_FILE\_\_**](broker__monitor_8c.md#function-timeout), [**\_\_LINE\_\_**](broker__monitor_8c.md#function-timeout))
define realloc (ptr, sz) [**cub\_realloc**](memory__cwrapper_8h.md#function-cub_realloc)(ptr, [**sz**](broker__monitor_8c.md#function-timeout), [**\_\_FILE\_\_**](broker__monitor_8c.md#function-timeout), [**\_\_LINE\_\_**](broker__monitor_8c.md#function-timeout))
define strdup (str) [**cub\_strdup**](memory__cwrapper_8h.md#function-cub_strdup)(str, [**\_\_FILE\_\_**](broker__monitor_8c.md#function-timeout), [**\_\_LINE\_\_**](broker__monitor_8c.md#function-timeout))

Public Functions Documentation

function cub_alloc

inline void * cub_alloc (
    size_t size,
    const  char * file,
    const  int line
) 

function cub_calloc

inline void * cub_calloc (
    size_t num,
    size_t size,
    const  char * file,
    const  int line
) 

function cub_free

inline void cub_free (
    void * ptr
) 

function cub_realloc

inline void * cub_realloc (
    void * ptr,
    size_t size,
    const  char * file,
    const  int line
) 

function cub_strdup

inline char * cub_strdup (
    const  char * str,
    const  char * file,
    const  int line
) 

function get_allocated_size

inline size_t get_allocated_size (
    void * ptr
) 

Macro Definition Documentation

define calloc

#define calloc (
    num,
    sz
) `cub_calloc (num, sz , __FILE__ , __LINE__ )`

define free

#define free (
    ptr
) `cub_free (ptr)`

define malloc

#define malloc (
    sz
) `cub_alloc ( sz , __FILE__ , __LINE__ )`

define realloc

#define realloc (
    ptr,
    sz
) `cub_realloc (ptr, sz , __FILE__ , __LINE__ )`

define strdup

#define strdup (
    str
) `cub_strdup (str, __FILE__ , __LINE__ )`


The documentation for this class was generated from the following file cubrid/src/base/memory_cwrapper.h