summaryrefslogtreecommitdiffstats
path: root/util/uhash_loader.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/uhash_loader.c')
-rw-r--r--util/uhash_loader.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/util/uhash_loader.c b/util/uhash_loader.c
index 55301210..6a0bfaf4 100644
--- a/util/uhash_loader.c
+++ b/util/uhash_loader.c
@@ -20,10 +20,18 @@ int main() {
void load_uhash(void) {
int shmid, err;
- shmid = shmget(SHM_KEY, sizeof(SHM_t), IPC_CREAT | IPC_EXCL | 0600);
+ shmid = shmget(SHM_KEY, sizeof(SHM_t),
+#ifdef USE_HUGETLB
+ SHM_HUGETLB |
+#endif
+ IPC_CREAT | IPC_EXCL | 0600);
err = errno;
if( err == EEXIST)
- shmid = shmget(SHM_KEY, sizeof(SHM_t), IPC_CREAT | 0600);
+ shmid = shmget(SHM_KEY, sizeof(SHM_t),
+#ifdef USE_HUGETLB
+ SHM_HUGETLB |
+#endif
+ IPC_CREAT | 0600);
if (shmid < 0)
{
perror("shmget");