Lines Matching +full:1 +full:k
18 'ft 1
22 'ft 1
35 'ft 1
36 'if \\n(cm=1 'ft 2
39 'pn 1
42 'nr cm 1
44 'ds +K
45 'ds -K
49 'ft 1
50 'ds +K \f3
51 'ds -K \fP
59 \f2\s14\h'\\n(.lu-\w'\\$1'u'\\$1\fP\s0\h'|0u'\c
61 'ds =f \&...\\$1
65 'ds =f \&...\\$1
70 'ft 1
79 .\" 1. Redistributions of source code must retain the above copyright
101 .nr H2 1
133 \h'|11n'\*(+Kchar\*(-K \fI*\fPargv[];
134 \*(+K{\*(-K
135 \h'|11n'\*(+Kregister\*(-K \*(+Kint\*(-K ncalls;
137 \h'|11n'\*(+Kif\*(-K (argc < 2) \*(+K{\*(-K
139 \h'|21n'exit(1);
140 \h'|11n'\*(+K}\*(-K
141 \h'|11n'ncalls = atoi(argv[1]);
142 \h'|11n'\*(+Kwhile\*(-K (ncalls\*-\*- > 0)
143 \h'|21n'(\*(+Kvoid\*(-K) getpid();
144 \*(+K}\*(-K\c\c
168 \*(+K#include\*(-K <signal\&.h>
170 \*(+Kint\*(-K\h'|11n'sigsub();
171 \*(+Kint\*(-K\h'|11n'otherpid;
172 \*(+Kint\*(-K\h'|11n'nsigs;
176 \h'|11n'\*(+Kchar\*(-K \fI*\fPargv[];
177 \*(+K{\*(-K
178 \h'|11n'\*(+Kint\*(-K pid;
180 \h'|11n'\*(+Kif\*(-K (argc < 2) \*(+K{\*(-K
182 \h'|21n'exit(1);
183 \h'|11n'\*(+K}\*(-K
184 \h'|11n'nsigs = atoi(argv[1]);
188 \h'|11n'\*(+Kif\*(-K (pid != 0) \*(+K{\*(-K
191 \h'|11n'\*(+K}\*(-K
192 \h'|11n'\*(+Kfor\*(-K (;;)
194 \*(+K}\*(-K\c\c
200 \*(+K{\*(-K
204 \h'|11n'\*(+Kif\*(-K (\*-\*-nsigs <= 0)
206 \*(+K}\*(-K\c\c
221 \*(+K#include\*(-K <signal\&.h>
223 \*(+Kint\*(-K\h'|11n'pid;
224 \*(+Kint\*(-K\h'|11n'nsigs;
225 \*(+Kint\*(-K\h'|11n'sigsub();
229 \h'|11n'\*(+Kchar\*(-K \fI*\fPargv[];
230 \*(+K{\*(-K
231 \h'|11n'\*(+Kregister\*(-K \*(+Kint\*(-K i;
233 \h'|11n'\*(+Kif\*(-K (argc < 2) \*(+K{\*(-K
235 \h'|21n'exit(1);
236 \h'|11n'\*(+K}\*(-K
237 \h'|11n'nsigs = atoi(argv[1]);
240 \h'|11n'\*(+Kfor\*(-K (i = 0; i < nsigs; i++)
242 \*(+K}\*(-K\c\c
248 \*(+K{\*(-K
251 \*(+K}\*(-K\c\c
270 \h'|11n'\*(+Kchar\*(-K \fI*\fPargv[];
271 \*(+K{\*(-K
272 \h'|11n'\*(+Kchar\*(-K buf[512];
273 \h'|11n'\*(+Kint\*(-K fd[2], msgsize;
274 \h'|11n'\*(+Kregister\*(-K \*(+Kint\*(-K i, iter;
276 \h'|11n'\*(+Kif\*(-K (argc < 3) \*(+K{\*(-K
278 \h'|21n'exit(1);
279 \h'|11n'\*(+K}\*(-K
284 \h'|11n'\*(+Kif\*(-K (msgsize > \*(+Ksizeof\*(-K (buf) || msgsize <= 0) \*(+K{\*(-K
287 \h'|11n'\*(+K}\*(-K
288 \h'|11n'\*(+Kif\*(-K (pipe(fd) < 0) \*(+K{\*(-K
291 \h'|11n'\*(+K}\*(-K
292 \h'|11n'\*(+Kfor\*(-K (i = 0; i < iter; i++) \*(+K{\*(-K
293 \h'|21n'write(fd[1], buf, msgsize);
295 \h'|11n'\*(+K}\*(-K
296 \*(+K}\*(-K\c\c
315 \h'|11n'\*(+Kchar\*(-K \fI*\fPargv[];
316 \*(+K{\*(-K
317 \h'|11n'\*(+Kchar\*(-K buf[512];
318 \h'|11n'\*(+Kint\*(-K fd[2], msgsize;
319 \h'|11n'\*(+Kregister\*(-K \*(+Kint\*(-K i, iter;
321 \h'|11n'\*(+Kif\*(-K (argc < 3) \*(+K{\*(-K
323 \h'|21n'exit(1);
324 \h'|11n'\*(+K}\*(-K
329 \h'|11n'\*(+Kif\*(-K (msgsize > \*(+Ksizeof\*(-K (buf) || msgsize <= 0) \*(+K{\*(-K
332 \h'|11n'\*(+K}\*(-K
333 \h'|11n'\*(+Kif\*(-K (pipe(fd) < 0) \*(+K{\*(-K
336 \h'|11n'\*(+K}\*(-K
337 \h'|11n'\*(+Kif\*(-K (fork() == 0)
338 \h'|21n'\*(+Kfor\*(-K (i = 0; i < iter; i++)
340 \h'|11n'\*(+Kelse\*(-K
341 \h'|21n'\*(+Kfor\*(-K (i = 0; i < iter; i++)
342 \h'|31n'write(fd[1], buf, msgsize);
343 \*(+K}\*(-K\c\c
365 \h'|11n'\*(+Kchar\*(-K \fI*\fPargv[];
366 \*(+K{\*(-K
367 \h'|11n'\*(+Kchar\*(-K buf[512];
368 \h'|11n'\*(+Kint\*(-K fd[2], fd2[2], msgsize;
369 \h'|11n'\*(+Kregister\*(-K \*(+Kint\*(-K i, iter;
371 \h'|11n'\*(+Kif\*(-K (argc < 3) \*(+K{\*(-K
373 \h'|21n'exit(1);
374 \h'|11n'\*(+K}\*(-K
379 \h'|11n'\*(+Kif\*(-K (msgsize > \*(+Ksizeof\*(-K (buf) || msgsize <= 0) \*(+K{\*(-K
382 \h'|11n'\*(+K}\*(-K
383 \h'|11n'\*(+Kif\*(-K (pipe(fd) < 0) \*(+K{\*(-K
386 \h'|11n'\*(+K}\*(-K
387 \h'|11n'\*(+Kif\*(-K (pipe(fd2) < 0) \*(+K{\*(-K
390 \h'|11n'\*(+K}\*(-K
391 \h'|11n'\*(+Kif\*(-K (fork() == 0)
392 \h'|21n'\*(+Kfor\*(-K (i = 0; i < iter; i++) \*(+K{\*(-K
394 \h'|31n'write(fd2[1], buf, msgsize);
395 \h'|21n'\*(+K}\*(-K
396 \h'|11n'\*(+Kelse\*(-K
397 \h'|21n'\*(+Kfor\*(-K (i = 0; i < iter; i++) \*(+K{\*(-K
398 \h'|31n'write(fd[1], buf, msgsize);
400 \h'|21n'\*(+K}\*(-K
401 \*(+K}\*(-K\c\c
423 \h'|11n'\*(+Kchar\*(-K \fI*\fPargv[];
424 \*(+K{\*(-K
425 \h'|11n'\*(+Kregister\*(-K \*(+Kint\*(-K nforks, i;
426 \h'|11n'\*(+Kchar\*(-K \fI*\fPcp;
427 \h'|11n'\*(+Kint\*(-K pid, child, status, brksize;
429 \h'|11n'\*(+Kif\*(-K (argc < 2) \*(+K{\*(-K
431 \h'|21n'exit(1);
432 \h'|11n'\*(+K}\*(-K
433 \h'|11n'nforks = atoi(argv[1]);
434 \h'|11n'\*(+Kif\*(-K (nforks < 0) \*(+K{\*(-K
435 \h'|21n'printf("%s: bad number of forks\en", argv[1]);
437 \h'|11n'\*(+K}\*(-K
439 \h'|11n'\*(+Kif\*(-K (brksize < 0) \*(+K{\*(-K
442 \h'|11n'\*(+K}\*(-K
443 \h'|11n'cp = (\*(+Kchar\*(-K \fI*\fP)sbrk(brksize);
444 \h'|11n'\*(+Kif\*(-K ((\*(+Kint\*(-K)cp == \*-1) \*(+K{\*(-K
447 \h'|11n'\*(+K}\*(-K
448 \h'|11n'\*(+Kfor\*(-K (i = 0; i < brksize; i += 1024)
450 \h'|11n'\*(+Kwhile\*(-K (nforks\*-\*- > 0) \*(+K{\*(-K
452 \h'|21n'\*(+Kif\*(-K (child == \*-1) \*(+K{\*(-K
454 \h'|31n'exit(\*-1);
455 \h'|21n'\*(+K}\*(-K
456 \h'|21n'\*(+Kif\*(-K (child == 0)
457 \h'|31n'\*_exit(\*-1);
458 \h'|21n'\*(+Kwhile\*(-K ((pid = wait(&status)) != \*-1 && pid != child)
460 \h'|11n'\*(+K}\*(-K
462 \*(+K}\*(-K\c\c
485 \h'|11n'\*(+Kchar\*(-K \fI*\fPargv[];
486 \*(+K{\*(-K
487 \h'|11n'\*(+Kregister\*(-K \*(+Kint\*(-K nexecs, i;
488 \h'|11n'\*(+Kchar\*(-K \fI*\fPcp, \fI*\fPsbrk();
489 \h'|11n'\*(+Kint\*(-K pid, child, status, brksize;
491 \h'|11n'\*(+Kif\*(-K (argc < 3) \*(+K{\*(-K
494 \h'|21n'exit(1);
495 \h'|11n'\*(+K}\*(-K
496 \h'|11n'nexecs = atoi(argv[1]);
497 \h'|11n'\*(+Kif\*(-K (nexecs < 0) \*(+K{\*(-K
498 \h'|21n'printf("%s: bad number of execs\en", argv[1]);
500 \h'|11n'\*(+K}\*(-K
502 \h'|11n'\*(+Kif\*(-K (brksize < 0) \*(+K{\*(-K
505 \h'|11n'\*(+K}\*(-K
507 \h'|11n'\*(+Kif\*(-K ((\*(+Kint\*(-K)cp == \*-1) \*(+K{\*(-K
510 \h'|11n'\*(+K}\*(-K
511 \h'|11n'\*(+Kfor\*(-K (i = 0; i < brksize; i += 1024)
513 \h'|11n'\*(+Kwhile\*(-K (nexecs\*-\*- > 0) \*(+K{\*(-K
515 \h'|21n'\*(+Kif\*(-K (child == \*-1) \*(+K{\*(-K
517 \h'|31n'exit(\*-1);
518 \h'|21n'\*(+K}\*(-K
519 \h'|21n'\*(+Kif\*(-K (child == 0) \*(+K{\*(-K
522 \h'|31n'\*_exit(\*-1);
523 \h'|21n'\*(+K}\*(-K
524 \h'|21n'\*(+Kwhile\*(-K ((pid = wait(&status)) != \*-1 && pid != child)
526 \h'|11n'\*(+K}\*(-K
528 \*(+K}\*(-K\c\c
546 \h'|11n'\*(+Kchar\*(-K \fI*\fPargv[];
547 \*(+K{\*(-K
550 \*(+K}\*(-K\c\c
570 \*(+Kchar\*(-K\h'|11n'space[1024 \fI*\fP 250] = "force into data segment";
574 \h'|11n'\*(+Kchar\*(-K \fI*\fPargv[];
575 \*(+K{\*(-K
578 \*(+K}\*(-K\c\c
594 \*(+K#include\*(-K <sys\fI\h'\w' 'u-\w'/'u'/\fPvadvise\&.h>
596 \*(+Kchar\*(-K\h'|11n'\fI*\fPvalloc();
600 \h'|11n'\*(+Kchar\*(-K \fI*\fPargv[];
601 \*(+K{\*(-K
602 \h'|11n'\*(+Kregister\*(-K i, niter;
603 \h'|11n'\*(+Kregister\*(-K \*(+Kchar\*(-K \fI*\fPpf, \fI*\fPlastpage;
604 \h'|11n'\*(+Kint\*(-K npages = 4096, pagesize, vflag = 0;
605 \h'|11n'\*(+Kchar\*(-K \fI*\fPpages, \fI*\fPname;
610 \h'|11n'\*(+Kif\*(-K (argc < 1) \*(+K{\*(-K
613 \h'|21n'exit(1);
614 \h'|11n'\*(+K}\*(-K
615 \h'|11n'\*(+Kif\*(-K (strcmp(\fI*\fPargv, "\*-p") == 0) \*(+K{\*(-K
617 \h'|21n'\*(+Kif\*(-K (argc < 1)
618 \h'|31n'\*(+Kgoto\*(-K usage;
620 \h'|21n'\*(+Kif\*(-K (npages <= 0) \*(+K{\*(-K
623 \h'|21n'\*(+K}\*(-K
625 \h'|21n'\*(+Kgoto\*(-K again;
626 \h'|11n'\*(+K}\*(-K
627 \h'|11n'\*(+Kif\*(-K (strcmp(\fI*\fPargv, "\*-v") == 0) \*(+K{\*(-K
630 \h'|21n'\*(+Kgoto\*(-K again;
631 \h'|11n'\*(+K}\*(-K
635 \h'|11n'\*(+Kif\*(-K (pages == (\*(+Kchar\*(-K \fI*\fP)0) \*(+K{\*(-K
636 \h'|21n'printf("Can\'t allocate %d pages (%2\&.1f megabytes)\&.\en",
639 \h'|11n'\*(+K}\*(-K
641 \h'|11n'\*(+Kif\*(-K (vflag)
643 \h'|11n'\*(+Kfor\*(-K (i = 0; i < niter; i++)
644 \h'|21n'\*(+Kfor\*(-K (pf = pages; pf < lastpage; pf += pagesize)
645 \h'|31n'\fI*\fPpf = 1;
646 \*(+K}\*(-K\c\c
661 \*(+K#include\*(-K <sys\fI\h'\w' 'u-\w'/'u'/\fPvadvise\&.h>
663 \*(+Kchar\*(-K\h'|11n'\fI*\fPvalloc();
664 \*(+Kint\*(-K\h'|11n'rand();
668 \h'|11n'\*(+Kchar\*(-K \fI*\fPargv[];
669 \*(+K{\*(-K
670 \h'|11n'\*(+Kregister\*(-K \*(+Kint\*(-K npages = 4096, pagesize, pn, i, niter;
671 \h'|11n'\*(+Kint\*(-K vflag = 0, debug = 0;
672 \h'|11n'\*(+Kchar\*(-K \fI*\fPpages, \fI*\fPname;
677 \h'|11n'\*(+Kif\*(-K (argc < 1) \*(+K{\*(-K
680 \h'|21n'exit(1);
681 \h'|11n'\*(+K}\*(-K
682 \h'|11n'\*(+Kif\*(-K (strcmp(\fI*\fPargv, "\*-p") == 0) \*(+K{\*(-K
684 \h'|21n'\*(+Kif\*(-K (argc < 1)
685 \h'|31n'\*(+Kgoto\*(-K usage;
687 \h'|21n'\*(+Kif\*(-K (npages <= 0) \*(+K{\*(-K
690 \h'|21n'\*(+K}\*(-K
692 \h'|21n'\*(+Kgoto\*(-K again;
693 \h'|11n'\*(+K}\*(-K
694 \h'|11n'\*(+Kif\*(-K (strcmp(\fI*\fPargv, "\*-v") == 0) \*(+K{\*(-K
697 \h'|21n'\*(+Kgoto\*(-K again;
698 \h'|11n'\*(+K}\*(-K
699 \h'|11n'\*(+Kif\*(-K (strcmp(\fI*\fPargv, "\*-d") == 0) \*(+K{\*(-K
702 \h'|21n'\*(+Kgoto\*(-K again;
703 \h'|11n'\*(+K}\*(-K
707 \h'|11n'\*(+Kif\*(-K (pages == (\*(+Kchar\*(-K \fI*\fP)0) \*(+K{\*(-K
708 \h'|21n'printf("Can\'t allocate %d pages (%2\&.1f megabytes)\&.\en",
711 \h'|11n'\*(+K}\*(-K
712 \h'|11n'\*(+Kif\*(-K (vflag)
714 \h'|11n'\*(+Kfor\*(-K (i = 0; i < niter; i++) \*(+K{\*(-K
716 \h'|21n'\*(+Kif\*(-K (debug)
718 \h'|21n'pages[pagesize \fI*\fP pn] = 1;
719 \h'|11n'\*(+K}\*(-K
720 \*(+K}\*(-K\c\c
741 \*(+Kfloat\*(-K\h'|11n'sqrt(), log(), rnd(), cos(), gauss();
742 \*(+Kchar\*(-K\h'|11n'\fI*\fPvalloc();
743 \*(+Kint\*(-K\h'|11n'rand();
747 \h'|11n'\*(+Kchar\*(-K \fI*\fPargv[];
748 \*(+K{\*(-K
749 \h'|11n'\*(+Kregister\*(-K \*(+Kint\*(-K pn, i, niter, delta;
750 \h'|11n'\*(+Kregister\*(-K \*(+Kchar\*(-K \fI*\fPpages;
751 \h'|11n'\*(+Kfloat\*(-K sd = 10\&.0;
752 \h'|11n'\*(+Kint\*(-K npages = 4096, pagesize, debug = 0;
753 \h'|11n'\*(+Kchar\*(-K \fI*\fPname;
758 \h'|11n'\*(+Kif\*(-K (argc < 1) \*(+K{\*(-K
762 \h'|21n'exit(1);
763 \h'|11n'\*(+K}\*(-K
764 \h'|11n'\*(+Kif\*(-K (strcmp(\fI*\fPargv, "\*-s") == 0) \*(+K{\*(-K
766 \h'|21n'\*(+Kif\*(-K (argc < 1)
767 \h'|31n'\*(+Kgoto\*(-K usage;
769 \h'|21n'\*(+Kif\*(-K (sd <= 0) \*(+K{\*(-K
772 \h'|21n'\*(+K}\*(-K
774 \h'|21n'\*(+Kgoto\*(-K again;
775 \h'|11n'\*(+K}\*(-K
776 \h'|11n'\*(+Kif\*(-K (strcmp(\fI*\fPargv, "\*-p") == 0) \*(+K{\*(-K
778 \h'|21n'\*(+Kif\*(-K (argc < 1)
779 \h'|31n'\*(+Kgoto\*(-K usage;
781 \h'|21n'\*(+Kif\*(-K (npages <= 0) \*(+K{\*(-K
784 \h'|21n'\*(+K}\*(-K
786 \h'|21n'\*(+Kgoto\*(-K again;
787 \h'|11n'\*(+K}\*(-K
788 \h'|11n'\*(+Kif\*(-K (strcmp(\fI*\fPargv, "\*-d") == 0) \*(+K{\*(-K
791 \h'|21n'\*(+Kgoto\*(-K again;
792 \h'|11n'\*(+K}\*(-K
796 \h'|11n'\*(+Kif\*(-K (pages == (\*(+Kchar\*(-K \fI*\fP)0) \*(+K{\*(-K
797 \h'|21n'printf("Can\'t allocate %d pages (%2\&.1f megabytes)\&.\en",
800 \h'|11n'\*(+K}\*(-K
802 \h'|11n'\*(+Kfor\*(-K (i = 0; i < niter; i++) \*(+K{\*(-K
804 \h'|21n'\*(+Kwhile\*(-K (pn + delta < 0 || pn + delta > npages)
807 \h'|21n'\*(+Kif\*(-K (debug)
809 \h'|21n'\*(+Kelse\*(-K
810 \h'|31n'pages[pn \fI*\fP pagesize] = 1;
811 \h'|11n'\*(+K}\*(-K
812 \*(+K}\*(-K\c\c
816 \*(+Kfloat\*(-K
819 \h'|11n'\*(+Kfloat\*(-K sd, mean;
820 \*(+K{\*(-K
821 \h'|11n'\*(+Kregister\*(-K \*(+Kfloat\*(-K qa, qb;
825 \h'|11n'\*(+Kreturn\*(-K (qa \fI*\fP cos(qb) \fI*\fP sd + mean);
826 \*(+K}\*(-K\c\c
830 \*(+Kfloat\*(-K
833 \*(+K{\*(-K
834 \h'|11n'\*(+Kstatic\*(-K \*(+Kint\*(-K seed = 1;
835 \h'|11n'\*(+Kstatic\*(-K \*(+Kint\*(-K biggest = 0x7fffffff;
837 \h'|11n'\*(+Kreturn\*(-K ((\*(+Kfloat\*(-K)rand(seed) \fI\h'\w' 'u-\w'/'u'/\fP (\*(+Kfloat\*(-K)big…
838 \*(+K}\*(-K\c\c
860 'ft 1
864 'ft 1
877 'ft 1
878 'if \\n(cm=1 'ft 2
881 'pn 1
884 'nr cm 1
886 'ds +K
887 'ds -K
891 'ft 1
892 'ds +K \f3
893 'ds -K \fP
901 \f2\s14\h'\\n(.lu-\w'\\$1'u'\\$1\fP\s0\h'|0u'\c
903 'ds =f \&...\\$1
907 'ds =f \&...\\$1
912 'ft 1
921 .\" 1. Redistributions of source code must retain the above copyright
946 \*(+K#\*(-K! \fI\h'\w' 'u-\w'/'u'/\fPbin\fI\h'\w' 'u-\w'/'u'/\fPcsh \*-fx
947 \*(+K#\*(-K Script to run benchmark programs\&.
948 \*(+K#\*(-K
956 time gausspage \*-p 7500 \*-s 1 30000
1001 \*(+K#\*(-K fill environment with ~1024 bytes
1012 setenv k 012345678901234567890123456789012345678901234567890123456780123456789