projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add definition for ability to produce a backtrace
[unix-history]
/
usr
/
src
/
sys
/
kern
/
kern_malloc.c
diff --git
a/usr/src/sys/kern/kern_malloc.c
b/usr/src/sys/kern/kern_malloc.c
index
f3cb91c
..
76d5e1a
100644
(file)
--- a/
usr/src/sys/kern/kern_malloc.c
+++ b/
usr/src/sys/kern/kern_malloc.c
@@
-1,19
+1,20
@@
/*
/*
- * Copyright (c) 1987, 1991
The Regents of the University of California.
- * All rights reserved.
+ * Copyright (c) 1987, 1991
, 1993
+ *
The Regents of the University of California.
All rights reserved.
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)kern_malloc.c
7.34
(Berkeley) %G%
+ * @(#)kern_malloc.c
8.3
(Berkeley) %G%
*/
*/
-#include "param.h"
-#include "proc.h"
-#include "map.h"
-#include "kernel.h"
-#include "malloc.h"
-#include "vm/vm.h"
-#include "vm/vm_kern.h"
+#include <sys/param.h>
+#include <sys/proc.h>
+#include <sys/map.h>
+#include <sys/kernel.h>
+#include <sys/malloc.h>
+
+#include <vm/vm.h>
+#include <vm/vm_kern.h>
struct kmembuckets bucket[MINBUCKET + 16];
struct kmemstats kmemstats[M_LAST];
struct kmembuckets bucket[MINBUCKET + 16];
struct kmemstats kmemstats[M_LAST];
@@
-80,7
+81,7
@@
malloc(size, type, flags)
register struct kmembuckets *kbp;
register struct kmemusage *kup;
register struct freelist *freep;
register struct kmembuckets *kbp;
register struct kmemusage *kup;
register struct freelist *freep;
- long indx, npg, alloc
, alloc
size;
+ long indx, npg, allocsize;
int s;
caddr_t va, cp, rp;
#ifdef KMEMSTATS
int s;
caddr_t va, cp, rp;
#ifdef KMEMSTATS
@@
-108,6
+109,7
@@
malloc(size, type, flags)
tsleep((caddr_t)ksp, PSWP+2, memname[type], 0);
IN;
}
tsleep((caddr_t)ksp, PSWP+2, memname[type], 0);
IN;
}
+ ksp->ks_size |= 1 << indx;
#endif
#ifdef DIAGNOSTIC
copysize = 1 << indx < MAX_COPY ? 1 << indx : MAX_COPY;
#endif
#ifdef DIAGNOSTIC
copysize = 1 << indx < MAX_COPY ? 1 << indx : MAX_COPY;