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 |
#define | get_auto_allocs() (auto_allocs) |
#define | set_auto_allocs(am) do { auto_allocs = (am); } while(0) |
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) |
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 struct auto_mem * | auto_allocs = NULL |
#define get_auto_allocs | ( | ) | (auto_allocs) |
#define set_auto_allocs | ( | am | ) | do { auto_allocs = (am); } while(0) |
bool ecpg_add_mem | ( | void * | ptr, |
int | lineno | ||
) |
Definition at line 124 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(), and ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY.
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 108 of file memory.c.
References ecpg_add_mem(), ecpg_alloc(), and ecpg_free().
Referenced by ecpg_store_result(), and ECPGget_desc().
void ecpg_clear_auto_mem | ( | void | ) |
Definition at line 158 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, and realloc.
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 138 of file memory.c.
References ecpg_free(), get_auto_allocs, auto_mem::next, auto_mem::pointer, and set_auto_allocs.
Referenced by ecpg_raise(), ecpg_raise_backend(), ECPGset_var(), and main().