void* sqlite3_malloc( int bytes );
bytes
The size of the requested allocation, in bytes.
A newly allocated buffer. If the memory is not available, NULL is returned.
This function obtains a dynamic memory allocation from the
SQLite library. Memory allocated with sqlite3_malloc()
should be released with
sqlite3_free()
.
Allocations will always start on an 8-byte (or larger)
boundary.
Although many SQLite environments will simply pass memory allocation requests on to the default system memory allocator, there are some environments that configure specific buffers for the SQLite library. By using these memory handling functions, an SQLite extension or module will work correctly in any SQLite environment, regardless of how the memory allocator is configured.