summaryrefslogtreecommitdiff
path: root/include/apr_mmap.h
diff options
context:
space:
mode:
authorDoug MacEachern <dougm@apache.org>2001-11-28 00:36:53 +0000
committerDoug MacEachern <dougm@apache.org>2001-11-28 00:36:53 +0000
commit4fa32e3ebd627e1cc370fefe0b871875420c4571 (patch)
tree9693c31129e169c60cf367a855aff41c191ff218 /include/apr_mmap.h
parent9951119cb2d56cf62e8eacaebae5606180b00a1c (diff)
downloadapr-4fa32e3ebd627e1cc370fefe0b871875420c4571.tar.gz
add APR_MMAP_CANDIDATE macro to test if filelength is an mmap candidate
(greater than or equal to APR_MMAP_THRESHOLD and less than APR_MMAP_LIMIT) PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62571 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/apr_mmap.h')
-rw-r--r--include/apr_mmap.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/apr_mmap.h b/include/apr_mmap.h
index 251f3fec1..d4113c8dd 100644
--- a/include/apr_mmap.h
+++ b/include/apr_mmap.h
@@ -137,6 +137,9 @@ struct apr_mmap_t {
# define APR_MMAP_LIMIT (4*1024*1024)
#endif /* MMAP_LIMIT */
+#define APR_MMAP_CANDIDATE(filelength) \
+ ((filelength >= APR_MMAP_THRESHOLD) && (filelength < APR_MMAP_LIMIT))
+
/* Function definitions */
/**