add rtt memory management support
This commit is contained in:
parent
bb71850863
commit
993374d860
|
@ -75,6 +75,23 @@ static malloc_zone_t* _sqliteZone_;
|
||||||
#define SQLITE_MALLOCSIZE(x) \
|
#define SQLITE_MALLOCSIZE(x) \
|
||||||
(_sqliteZone_ ? _sqliteZone_->size(_sqliteZone_,x) : malloc_size(x))
|
(_sqliteZone_ ? _sqliteZone_->size(_sqliteZone_,x) : malloc_size(x))
|
||||||
|
|
||||||
|
#elif defined(SQLITE_OS_RTT)
|
||||||
|
/*
|
||||||
|
** Use standard C library malloc and free on non-Apple systems.
|
||||||
|
** Also used by rt-thread systems if SQLITE_WITHOUT_ZONEMALLOC is defined.
|
||||||
|
*/
|
||||||
|
#define SQLITE_MALLOC(x) rt_malloc(x)
|
||||||
|
#define SQLITE_FREE(x) rt_free(x)
|
||||||
|
#define SQLITE_REALLOC(x,y) rt_realloc((x),(y))
|
||||||
|
|
||||||
|
#if (!defined(SQLITE_WITHOUT_MSIZE)) \
|
||||||
|
&& (defined(HAVE_MALLOC_H) && defined(HAVE_MALLOC_USABLE_SIZE))
|
||||||
|
# error "not have malloc_usable_size()"
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_MALLOC_USABLE_SIZE
|
||||||
|
# undef SQLITE_MALLOCSIZE
|
||||||
|
#endif
|
||||||
|
|
||||||
#else /* if not __APPLE__ */
|
#else /* if not __APPLE__ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue