SQLite Forum

How do I use sqlite3_malloc in Sqlite
Login
If you consult <u>[the docs for the allocation functions](https://sqlite.org/c3ref/free.html)</u>, you will find that they operate just like the malloc() and free() your web search finds. And, as you can see from the SQLite docs and the thousands of examples your search will reveal, they operate the same way as the standard C library allocation functions. Hence, you can use those examples as examples of using sqlite3_malloc() and sqlite3_free(), (with a slight name change, of course.)

Here would be one, semi-useless example:<code>
  sqlite3_free( sqlite3_malloc( 1234 ) );
</code>. You may devise more useful examples once you decide what it is that you are trying to do beyond just use the functions.