aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2007-08-23 02:47:53 +0000
committerdrh <drh@noemail.net>2007-08-23 02:47:53 +0000
commit4a50aac5645b7dffed2c27e552675fa4be3a9368 (patch)
tree8a197bbd8fca21cf558ae84e510efd8168fe72c2 /src/os_unix.c
parented138fb3bc8e55a6ae93669899dce79e5e26c65a (diff)
downloadsqlite-4a50aac5645b7dffed2c27e552675fa4be3a9368.tar.gz
sqlite-4a50aac5645b7dffed2c27e552675fa4be3a9368.zip
Improvements to memory leak detection. The --backtrace=NNN option is now
recognized by tester.tcl. Memory leak summaries are automatically written to the file ./memleak.txt and each leak is tagged with the test in which it occurred. The quick.test script runs on Linux with no errors and no leaks. (CVS 4273) FossilOrigin-Name: 21f6b31097692171c6493e6ca6de6acbd62dc595
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index 75cf36e8d..eb7a66b64 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -2657,6 +2657,10 @@ static int unixRandomness(void *pNotUsed, int nBuf, char *zBuf){
/*
** Sleep for a little while. Return the amount of time slept.
** The argument is the number of microseconds we want to sleep.
+** The return value is the number of microseconds of sleep actually
+** requested from the underlying operating system, a number which
+** might be greater than or equal to the argument, but not less
+** than the argument.
*/
static int unixSleep(void *pNotUsed, int microseconds){
#if defined(HAVE_USLEEP) && HAVE_USLEEP
@@ -2665,7 +2669,7 @@ static int unixSleep(void *pNotUsed, int microseconds){
#else
int seconds = (microseconds+999999)/1000000;
sleep(seconds);
- return seconds;
+ return seconds*1000000;
#endif
}