SQLite Forum

Feature request: support sqlite3_mem_methods.xSize = NULL
Login
Note that it is easy to implement that function easily even if your system does not support it; write a wrapper for malloc/realloc/free that adds space to store the size. Example:

```c
void*my_malloc(int x) {
  int*h;
  if(!x) return 0;
  h=malloc(x+sizeof(int));
  if(!h) return 0;
  *h=x;
  return h+1;
}

void my_free(void*x) {
  int*o=x;
  if(x) free(o-1);
}
```

(Note: This code is untested)