| 16 |
|
|
| 17 |
#include "section_list.h" |
#include "section_list.h" |
| 18 |
#include "log.h" |
#include "log.h" |
|
#include "io.h" |
|
| 19 |
#include "trie_dict.h" |
#include "trie_dict.h" |
| 20 |
#include <stdio.h> |
#include <stdio.h> |
| 21 |
#include <string.h> |
#include <string.h> |
| 29 |
// ARTICLE_BLOCK_PER_SHM * ARTICLE_BLOCK_SHM_COUNT_LIMIT should be |
// ARTICLE_BLOCK_PER_SHM * ARTICLE_BLOCK_SHM_COUNT_LIMIT should be |
| 30 |
// no less than BBS_article_block_limit_per_section * BBS_max_section, |
// no less than BBS_article_block_limit_per_section * BBS_max_section, |
| 31 |
// in order to allocate enough memory for blocks |
// in order to allocate enough memory for blocks |
| 32 |
#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 400 // sizeof(ARTICLE_BLOCK) * ARTICLE_BLOCK_PER_SHM is the size of each shm segment to allocate |
| 33 |
#define ARTICLE_BLOCK_SHM_COUNT_LIMIT 256 // limited by length (8-bit) of proj_id in ftok(path, proj_id) |
#define ARTICLE_BLOCK_SHM_COUNT_LIMIT 256 // limited by length (8-bit) of proj_id in ftok(path, proj_id) |
| 34 |
|
|
| 35 |
struct article_block_shm_t |
struct article_block_shm_t |