diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-03-09 10:54:02 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-03-09 10:54:02 +0800 |
commit | a9ab0dab6e86c98cfb4fb80db1ba56d51a3c0daa (patch) | |
tree | 4d0298cfc9f25284f9a4ab923cae423b40366563 /include | |
parent | 085c9a93cf63c5511f28005deb06f8ba25c8b667 (diff) | |
download | pttbbs-a9ab0dab6e86c98cfb4fb80db1ba56d51a3c0daa.tar pttbbs-a9ab0dab6e86c98cfb4fb80db1ba56d51a3c0daa.tar.gz pttbbs-a9ab0dab6e86c98cfb4fb80db1ba56d51a3c0daa.tar.bz2 pttbbs-a9ab0dab6e86c98cfb4fb80db1ba56d51a3c0daa.tar.lz pttbbs-a9ab0dab6e86c98cfb4fb80db1ba56d51a3c0daa.tar.xz pttbbs-a9ab0dab6e86c98cfb4fb80db1ba56d51a3c0daa.tar.zst pttbbs-a9ab0dab6e86c98cfb4fb80db1ba56d51a3c0daa.zip |
fix alignment and permission problems when USE_HUGETLB.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2583 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'include')
-rw-r--r-- | include/pttstruct.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/pttstruct.h b/include/pttstruct.h index ec740c2c..045de383 100644 --- a/include/pttstruct.h +++ b/include/pttstruct.h @@ -577,6 +577,12 @@ typedef struct { #endif } SHM_t; +#ifdef USE_HUGETLB // 4MB aligned +# define SHMSIZE (sizeof(SHM_t)/(1048576*4)+1)*1048576*4 +#else +# define SHMSIZE (sizeof(SHM_t)) +#endif + typedef struct { unsigned char oldlen; /* previous line length */ unsigned char len; /* current length of line */ |