File: point.h

package info (click to toggle)
qrouter 1.4.71-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 1,620 kB
  • sloc: ansic: 19,446; sh: 7,504; makefile: 149; tcl: 3
file content (22 lines) | stat: -rw-r--r-- 695 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*--------------------------------------------------------------*/
/* point.h --							*/
/*								*/
/* Memory mapped point allocation (header file)			*/
/*--------------------------------------------------------------*/
/* Written by Tim Edwards, April 2017, based on code from Magic */
/*--------------------------------------------------------------*/

#ifdef HAVE_SYS_MMAN_H
#include <sys/mman.h>
#include <unistd.h>

/* Page size is 4KB so we mmap a segment equal to 64 pages */
#define POINT_STORE_BLOCK_SIZE (4 * 1024 * 64)

extern POINT PointStoreFreeList;
extern POINT PointStoreFreeList_end;

#endif /* HAVE_SYS_MMAN_H */

extern POINT allocPOINT();
extern void freePOINT(POINT gp);