diff options
author | wens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-03-08 16:55:54 +0800 |
---|---|---|
committer | wens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-03-08 16:55:54 +0800 |
commit | 8e81df07a3e3ea7abc2159e9ebb5bef6b9caf68a (patch) | |
tree | c0e12c11e4aa726ea3ff950b007de9edb4ffd6e0 /util/uhash_loader.c | |
parent | bf85ed1d1979c65a6bb93ae965dd50282e6326a5 (diff) | |
download | pttbbs-8e81df07a3e3ea7abc2159e9ebb5bef6b9caf68a.tar pttbbs-8e81df07a3e3ea7abc2159e9ebb5bef6b9caf68a.tar.gz pttbbs-8e81df07a3e3ea7abc2159e9ebb5bef6b9caf68a.tar.bz2 pttbbs-8e81df07a3e3ea7abc2159e9ebb5bef6b9caf68a.tar.lz pttbbs-8e81df07a3e3ea7abc2159e9ebb5bef6b9caf68a.tar.xz pttbbs-8e81df07a3e3ea7abc2159e9ebb5bef6b9caf68a.tar.zst pttbbs-8e81df07a3e3ea7abc2159e9ebb5bef6b9caf68a.zip |
add support for hugetblpage of Linux 2.6
do not use this if you do not know what this is
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2581 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'util/uhash_loader.c')
-rw-r--r-- | util/uhash_loader.c | 12 |
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"); |