PostgreSQL Source Code
git master
|
#include "postgres_fe.h"
#include "ecpg-pthread-win32.h"
#include "ecpgerrno.h"
#include "ecpglib.h"
#include "ecpglib_extern.h"
#include "ecpgtype.h"
Go to the source code of this file.
Data Structures | |
struct | auto_mem |
Macros | |
#define | POSTGRES_ECPG_INTERNAL |
Functions | |
void | ecpg_free (void *ptr) |
char * | ecpg_alloc (long size, int lineno) |
char * | ecpg_realloc (void *ptr, long size, int lineno) |
char * | ecpg_strdup (const char *string, int lineno) |
static void | auto_mem_destructor (void *arg) |
static void | auto_mem_key_init (void) |
static struct auto_mem * | get_auto_allocs (void) |
static void | set_auto_allocs (struct auto_mem *am) |
char * | ecpg_auto_alloc (long size, int lineno) |
bool | ecpg_add_mem (void *ptr, int lineno) |
void | ECPGfree_auto_mem (void) |
void | ecpg_clear_auto_mem (void) |
Variables | |
static pthread_key_t | auto_mem_key |
static pthread_once_t | auto_mem_once = PTHREAD_ONCE_INIT |
|
static |
Definition at line 75 of file memory.c.
References arg, and ECPGfree_auto_mem().
Referenced by auto_mem_key_init().
|
static |
Definition at line 82 of file memory.c.
References auto_mem_destructor(), and auto_mem_key.
Referenced by get_auto_allocs().
bool ecpg_add_mem | ( | void * | ptr, |
int | lineno | ||
) |
Definition at line 117 of file memory.c.
References ecpg_alloc(), get_auto_allocs(), auto_mem::next, auto_mem::pointer, and set_auto_allocs().
Referenced by ecpg_auto_alloc().
char* ecpg_alloc | ( | long | size, |
int | lineno | ||
) |
Definition at line 19 of file memory.c.
References calloc, ECPG_OUT_OF_MEMORY, ecpg_raise(), ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, and size.
Referenced by AddStmtToCache(), convert_bytea_to_string(), deallocate_one(), ecpg_add_mem(), ecpg_auto_alloc(), ecpg_build_compat_sqlda(), ecpg_build_native_sqlda(), ecpg_build_params(), ecpg_do_prologue(), ecpg_get_data(), ecpg_is_type_an_array(), ecpg_register_prepared_stmt(), ecpg_store_input(), ECPGallocate_desc(), ECPGconnect(), ECPGset_desc(), insert_tobeinserted(), prepare_common(), print_param_value(), quote_postgres(), replace_variables(), and store_input_from_desc().
char* ecpg_auto_alloc | ( | long | size, |
int | lineno | ||
) |
Definition at line 101 of file memory.c.
References ecpg_add_mem(), ecpg_alloc(), ecpg_free(), and size.
Referenced by ecpg_store_result(), and ECPGget_desc().
void ecpg_clear_auto_mem | ( | void | ) |
Definition at line 151 of file memory.c.
References ecpg_free(), get_auto_allocs(), auto_mem::next, and set_auto_allocs().
Referenced by ecpg_do_prologue(), and ECPGconnect().
void ecpg_free | ( | void * | ptr | ) |
Definition at line 13 of file memory.c.
References free.
Referenced by deallocate_one(), descriptor_free(), ecpg_auto_alloc(), ecpg_build_params(), ecpg_clear_auto_mem(), ecpg_do_prologue(), ecpg_finish(), ecpg_free_params(), ecpg_freeStmtCacheEntry(), ecpg_register_prepared_stmt(), ecpg_store_input(), ECPGallocate_desc(), ECPGconnect(), ECPGfree_auto_mem(), ECPGget_desc(), ECPGset_desc(), free_statement(), free_variable(), insert_tobeinserted(), prepare_common(), print_param_value(), quote_postgres(), replace_variables(), and set_desc_attr().
char* ecpg_realloc | ( | void * | ptr, |
long | size, | ||
int | lineno | ||
) |
Definition at line 33 of file memory.c.
References ECPG_OUT_OF_MEMORY, ecpg_raise(), ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, realloc, and size.
Referenced by ecpg_build_params(), and ecpg_store_input().
char* ecpg_strdup | ( | const char * | string, |
int | lineno | ||
) |
Definition at line 47 of file memory.c.
References ECPG_OUT_OF_MEMORY, ecpg_raise(), and ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY.
Referenced by AddStmtToCache(), ecpg_auto_prepare(), ecpg_do_prologue(), ecpg_register_prepared_stmt(), ecpg_store_input(), ECPGconnect(), ECPGget_desc(), and prepare_common().
void ECPGfree_auto_mem | ( | void | ) |
Definition at line 131 of file memory.c.
References ecpg_free(), get_auto_allocs(), auto_mem::next, auto_mem::pointer, and set_auto_allocs().
Referenced by auto_mem_destructor(), ecpg_raise(), ecpg_raise_backend(), ECPGset_var(), and main().
|
static |
Definition at line 88 of file memory.c.
References auto_mem_key, auto_mem_key_init(), auto_mem_once, and pthread_getspecific().
Referenced by ecpg_add_mem(), ecpg_clear_auto_mem(), and ECPGfree_auto_mem().
|
static |
Definition at line 95 of file memory.c.
References auto_mem_key, and pthread_setspecific().
Referenced by ecpg_add_mem(), ecpg_clear_auto_mem(), and ECPGfree_auto_mem().
|
static |
Definition at line 71 of file memory.c.
Referenced by auto_mem_key_init(), get_auto_allocs(), and set_auto_allocs().
|
static |
Definition at line 72 of file memory.c.
Referenced by get_auto_allocs().