CUBRID Engine  latest
memory_alloc.c File Reference
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "set_object.h"
#include "misc_string.h"
#include "object_domain.h"
#include "dbtype.h"
#include "memory_alloc.h"
#include "util_func.h"
#include "error_manager.h"
#include "intl_support.h"
#include "resource_tracker.hpp"
#include "customheaps.h"
#include "quick_fit.h"
Include dependency graph for memory_alloc.c:

Go to the source code of this file.

Macros

#define DEFAULT_OBSTACK_CHUNK_SIZE   32768 /* 1024 x 32 */
 

Functions

int ansisql_strcmp (const char *s, const char *t)
 
int ansisql_strcasecmp (const char *s, const char *t)
 
int db_alignment (int n)
 
int db_align_to (int n, int alignment)
 
HL_HEAPID db_create_ostk_heap (int chunk_size)
 
void db_destroy_ostk_heap (HL_HEAPID heap_id)
 
void * db_ostk_alloc (HL_HEAPID heap_id, size_t size)
 
HL_HEAPID db_create_private_heap (void)
 
void db_clear_private_heap (THREAD_ENTRY *thread_p, HL_HEAPID heap_id)
 
HL_HEAPID db_change_private_heap (THREAD_ENTRY *thread_p, HL_HEAPID heap_id)
 
HL_HEAPID db_replace_private_heap (THREAD_ENTRY *thread_p)
 
void db_destroy_private_heap (THREAD_ENTRY *thread_p, HL_HEAPID heap_id)
 
void * db_private_alloc_debug (THREAD_ENTRY *thrd, size_t size, bool rc_track, const char *caller_file, int caller_line)
 
void * db_private_realloc_debug (THREAD_ENTRY *thrd, void *ptr, size_t size, bool rc_track, const char *caller_file, int caller_line)
 
char * db_private_strdup (THREAD_ENTRY *thrd, const char *s)
 
void db_private_free_debug (THREAD_ENTRY *thrd, void *ptr, bool rc_track, const char *caller_file, int caller_line)
 
void * db_private_alloc_external (THREAD_ENTRY *thrd, size_t size)
 
void db_private_free_external (THREAD_ENTRY *thrd, void *ptr)
 
void * db_private_realloc_external (THREAD_ENTRY *thrd, void *ptr, size_t size)
 

Variables

unsigned int db_on_server
 
HL_HEAPID private_heap_id = 0
 

Macro Definition Documentation

#define DEFAULT_OBSTACK_CHUNK_SIZE   32768 /* 1024 x 32 */

Definition at line 51 of file memory_alloc.c.

Function Documentation

int ansisql_strcasecmp ( const char *  s,
const char *  t 
)

Definition at line 134 of file memory_alloc.c.

References intl_identifier_ncasecmp(), and strlen.

Referenced by db_query_get_tuple_value_by_name().

Here is the caller graph for this function:

int ansisql_strcmp ( const char *  s,
const char *  t 
)

Definition at line 79 of file memory_alloc.c.

Referenced by ehash_compare_key(), and ehash_free_recdes().

Here is the caller graph for this function:

int db_align_to ( int  n,
int  alignment 
)

Definition at line 224 of file memory_alloc.c.

Referenced by compute_rec_size().

Here is the caller graph for this function:

int db_alignment ( int  n)

Definition at line 192 of file memory_alloc.c.

Referenced by compute_rec_size().

Here is the caller graph for this function:

void db_clear_private_heap ( THREAD_ENTRY thread_p,
HL_HEAPID  heap_id 
)

Definition at line 314 of file memory_alloc.c.

References hl_clear_lea_heap(), and private_heap_id.

Referenced by net_server_request().

Here is the caller graph for this function:

HL_HEAPID db_create_ostk_heap ( int  chunk_size)

Definition at line 239 of file memory_alloc.c.

References hl_register_ostk_heap().

Referenced by pt_alloc_packing_buf().

Here is the caller graph for this function:

HL_HEAPID db_create_private_heap ( void  )

Definition at line 294 of file memory_alloc.c.

References db_on_server, and hl_register_lea_heap().

Referenced by db_replace_private_heap(), and cubthread::entry::entry().

Here is the caller graph for this function:

void db_destroy_ostk_heap ( HL_HEAPID  heap_id)

Definition at line 250 of file memory_alloc.c.

References hl_unregister_ostk_heap().

Referenced by pt_free_packing_buf().

Here is the caller graph for this function:

void db_destroy_private_heap ( THREAD_ENTRY thread_p,
HL_HEAPID  heap_id 
)

Definition at line 388 of file memory_alloc.c.

References db_private_alloc_debug(), hl_unregister_lea_heap(), NULL, and private_heap_id.

Referenced by cubthread::entry::clear_resources().

Here is the caller graph for this function:

void* db_ostk_alloc ( HL_HEAPID  heap_id,
size_t  size 
)

Definition at line 262 of file memory_alloc.c.

References hl_ostk_alloc(), hl_ostk_free(), and NULL.

Referenced by pt_alloc_packing_buf().

Here is the caller graph for this function:

void* db_private_alloc_debug ( THREAD_ENTRY thrd,
size_t  size,
bool  rc_track,
const char *  caller_file,
int  caller_line 
)
void* db_private_alloc_external ( THREAD_ENTRY thrd,
size_t  size 
)

Definition at line 804 of file memory_alloc.c.

References db_private_alloc_debug().

void db_private_free_debug ( THREAD_ENTRY thrd,
void *  ptr,
bool  rc_track,
const char *  caller_file,
int  caller_line 
)

Definition at line 724 of file memory_alloc.c.

References db_on_server, db_ws_free(), hl_lea_free(), NULL, and private_heap_id.

Referenced by db_private_free_external(), and db_private_strdup().

Here is the caller graph for this function:

void db_private_free_external ( THREAD_ENTRY thrd,
void *  ptr 
)

Definition at line 815 of file memory_alloc.c.

References db_private_free_debug().

void* db_private_realloc_debug ( THREAD_ENTRY thrd,
void *  ptr,
size_t  size,
bool  rc_track,
const char *  caller_file,
int  caller_line 
)
HL_HEAPID db_replace_private_heap ( THREAD_ENTRY thread_p)

Definition at line 359 of file memory_alloc.c.

References db_create_private_heap(), db_on_server, and private_heap_id.

Variable Documentation