summaryrefslogtreecommitdiffstats
path: root/mbbsd/cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd/cache.c')
-rw-r--r--mbbsd/cache.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mbbsd/cache.c b/mbbsd/cache.c
index 493b9b91..4933339f 100644
--- a/mbbsd/cache.c
+++ b/mbbsd/cache.c
@@ -48,7 +48,11 @@ attach_shm(int shmkey, int shmsize)
void *shmptr = (void *)NULL;
int shmid;
- shmid = shmget(shmkey, shmsize, 0);
+ shmid = shmget(shmkey, shmsize,
+#ifdef USE_HUGETLB
+ SHM_HUGETLB |
+#endif
+ 0);
if (shmid < 0) {
// SHM should be created by uhash_loader, NOT mbbsd or other utils
attach_err(shmkey, "shmget");