diff options
author | drh <> | 2021-12-09 19:42:52 +0000 |
---|---|---|
committer | drh <> | 2021-12-09 19:42:52 +0000 |
commit | 5a4ac1cc302388e8717f9873fc90e5b648a74eac (patch) | |
tree | 23764810a3189b746de1d3d56ad732963ddd195d /src/malloc.c | |
parent | a11c5e22b5eb32cdf2061a6c19fd7bf4d2a36e05 (diff) | |
download | sqlite-5a4ac1cc302388e8717f9873fc90e5b648a74eac.tar.gz sqlite-5a4ac1cc302388e8717f9873fc90e5b648a74eac.zip |
Remove unused code and fix comments. Final cleanup before merging.
FossilOrigin-Name: ce42039f5647b1f276acf5d9911528ecb47df1544a587def72c8cd6b2f664289
Diffstat (limited to 'src/malloc.c')
-rw-r--r-- | src/malloc.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/src/malloc.c b/src/malloc.c index 9a2eaeec1..932cecc21 100644 --- a/src/malloc.c +++ b/src/malloc.c @@ -211,27 +211,6 @@ sqlite3_int64 sqlite3_memory_highwater(int resetFlag){ return mx; } -#if 0 -/* -** Return an estimate of the amount of unallocated memory. -** -** This the hard heap limit minus the current memory usage. It might -** not be possible to allocate this much memory all at once. This is -** only an estimate. -*/ -sqlite3_int64 sqlite3EstMemoryAvailable(void){ - sqlite3_int64 n; - sqlite3_mutex_enter(mem0.mutex); - n = mem0.alarmThreshold; - if( n<=0 ) n = mem0.hardLimit; - sqlite3_mutex_leave(mem0.mutex); - if( n<=0 ) n = LARGEST_INT64; - n -= sqlite3_memory_used(); - if( n<0 ) n = 0; - return n; -} -#endif - /* ** Trigger the alarm */ |