I was looking into overriding the sqlite_mem_methods interface to
specify my own allocator.  The two functions I have a question about
are these:

int (*xSize)(void*)
int (*xRoundup)(int size);

I've briefly looked over the source code it *seems* like I can safely
return 0 from xSize and 'size' from xRoundup, with the only effects
being that functions such as sqlite_mem_used() will be useless.  Are
there any more subtle implications of implementing these functions in
the aforementioned way that I'm missing?

the problem is that I have a 3rd party allocator that is extremely
fast and implements malloc, free, and realloc, but does not implement
the other functions.  I can probably implement xRoundup if necessary
by figuring out their allocation / alignment algorithm and
re-implementing the alignment portion, but xSize I don't think will be
possible to implement at all.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to