| 27 |
#include <sys/shm.h> |
#include <sys/shm.h> |
| 28 |
#include <sys/ipc.h> |
#include <sys/ipc.h> |
| 29 |
|
|
| 30 |
|
// ARTICLE_BLOCK_PER_SHM * ARTICLE_BLOCK_SHM_COUNT_LIMIT should be |
| 31 |
|
// no less than BBS_article_block_limit_per_section * BBS_max_section, |
| 32 |
|
// in order to allocate enough memory for blocks |
| 33 |
#define ARTICLE_BLOCK_PER_SHM 50 // sizeof(ARTICLE_BLOCK) * ARTICLE_BLOCK_PER_SHM is the size of each shm segment to allocate |
#define ARTICLE_BLOCK_PER_SHM 50 // sizeof(ARTICLE_BLOCK) * ARTICLE_BLOCK_PER_SHM is the size of each shm segment to allocate |
| 34 |
#define ARTICLE_BLOCK_SHM_COUNT_LIMIT 256 |
#define ARTICLE_BLOCK_SHM_COUNT_LIMIT 256 // limited by length (8-bit) of proj_id in ftok(path, proj_id) |
| 35 |
|
|
| 36 |
struct article_block_shm_t |
struct article_block_shm_t |
| 37 |
{ |
{ |