File: wpool.c

package info (click to toggle)
gcl 2.6.14-19
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 60,804 kB
  • sloc: ansic: 177,407; lisp: 151,508; asm: 128,169; sh: 22,510; cpp: 11,923; tcl: 3,181; perl: 2,930; makefile: 2,360; sed: 334; yacc: 226; lex: 95; awk: 30; fortran: 24; csh: 23
file content (35 lines) | stat: -rw-r--r-- 664 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include <stdio.h>

#define NO_PRELINK_UNEXEC_DIVERSION
char *rb_end=NULL,*rb_start=NULL,*heap_end=NULL;
void *data_start=NULL;
int multiprocess_memory_pool=1;

#include "include.h"
#include "page.h"
#include "pool.h"

/*lintian*/
void
assert_error(const char *a,unsigned l,const char *f,const char *n) {
  update_pool(0);
  get_pool();
  pool_check();
}

int
main(int argc,char * argv[],char * envp[]) {

  int s=3;

  if (argc>1) sscanf(argv[1],"%d",&s);
  open_pool();
  for (;;) {
    lock_pool();
    fprintf(stderr,"master pid %lu %lu processess %lu pages\n",Pool->pid,Pool->n,Pool->s);
    fflush(stderr);
    unlock_pool();
    sleep(s);
  }
  return 0;
}