GRASS GIS 8 Programmer's Manual
8.5.0dev(2024)-d6dec75dd4
|
DBMI Library (base) - allocate memory. More...
Go to the source code of this file.
Functions | |
char * | db_store (const char *s) |
Make a copy of string buffer. More... | |
void * | db_malloc (int n) |
Allocate memory. More... | |
void * | db_calloc (int n, int m) |
Allocate memory. More... | |
void * | db_realloc (void *s, int n) |
Reallocate memory. More... | |
void | db_free (void *s) |
Free allocated memory. More... | |
DBMI Library (base) - allocate memory.
(C) 1999-2009, 2011 by the GRASS Development Team
This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.
Definition in file db/dbmi_base/alloc.c.
void* db_calloc | ( | int | n, |
int | m | ||
) |
Allocate memory.
On failure is called db_memory_error().
n | number of entities |
m | entity size |
Definition at line 69 of file db/dbmi_base/alloc.c.
Referenced by db_alloc_dirent_array(), db_alloc_handle_array(), db_alloc_index_array(), and db_copy_column().
void db_free | ( | void * | s | ) |
Free allocated memory.
s | pointer to memory to be freed |
Definition at line 111 of file db/dbmi_base/alloc.c.
Referenced by db__close_all_cursors(), db__mark_database_closed(), db_CatValArray_free(), db_d_close_cursor(), db_free_cursor_column_flags(), db_free_dirent_array(), db_free_handle_array(), db_free_index_array(), db_free_string(), and db_shutdown_driver().
void* db_malloc | ( | int | n | ) |
Allocate memory.
On failure is called db_memory_error().
n | number of bytes to be allocated |
Definition at line 47 of file db/dbmi_base/alloc.c.
void* db_realloc | ( | void * | s, |
int | n | ||
) |
Reallocate memory.
On failure is called db_memory_error().
s | pointer to memory |
n | number of newly allocated bytes |
Definition at line 93 of file db/dbmi_base/alloc.c.
Referenced by db__add_cursor_to_driver_state(), db_enlarge_string(), and db_new_token().
char* db_store | ( | const char * | s | ) |
Make a copy of string buffer.
Allocated string buffer should be freed by db_free().
s | source string buffer |
Definition at line 28 of file db/dbmi_base/alloc.c.
Referenced by db__mark_database_open().