Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F149938416
D27143.id79337.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D27143.id79337.diff
View Options
Index: sys/kern/kern_malloc.c
===================================================================
--- sys/kern/kern_malloc.c
+++ sys/kern/kern_malloc.c
@@ -230,11 +230,6 @@
static int sysctl_kern_malloc_stats(SYSCTL_HANDLER_ARGS);
-/*
- * time_uptime of the last malloc(9) failure (induced or real).
- */
-static time_t t_malloc_fail;
-
#if defined(MALLOC_MAKE_FAILURES) || (MALLOC_DEBUG_MAXZONES > 1)
static SYSCTL_NODE(_debug, OID_AUTO, malloc, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
"Kernel malloc debugging options");
@@ -372,13 +367,6 @@
}
#endif /* MALLOC_DEBUG_MAXZONES > 1 */
-int
-malloc_last_fail(void)
-{
-
- return (time_uptime - t_malloc_fail);
-}
-
/*
* An allocation has succeeded -- update malloc type statistics for the
* amount of bucket size. Occurs within a critical section so that the
@@ -534,7 +522,6 @@
atomic_add_int(&malloc_nowait_count, 1);
if ((malloc_nowait_count % malloc_failure_rate) == 0) {
atomic_add_int(&malloc_failure_count, 1);
- t_malloc_fail = time_uptime;
*vap = NULL;
return (EJUSTRETURN);
}
@@ -661,7 +648,6 @@
if (__predict_false(va == NULL)) {
KASSERT((flags & M_WAITOK) == 0,
("malloc(M_WAITOK) returned NULL"));
- t_malloc_fail = time_uptime;
}
#ifdef DEBUG_REDZONE
if (va != NULL)
@@ -729,7 +715,6 @@
if (__predict_false(va == NULL)) {
KASSERT((flags & M_WAITOK) == 0,
("malloc(M_WAITOK) returned NULL"));
- t_malloc_fail = time_uptime;
}
#ifdef DEBUG_REDZONE
if (va != NULL)
@@ -760,7 +745,6 @@
if (__predict_false(va == NULL)) {
KASSERT((flags & M_WAITOK) == 0,
("malloc(M_WAITOK) returned NULL"));
- t_malloc_fail = time_uptime;
}
#ifdef DEBUG_REDZONE
if (va != NULL)
@@ -790,7 +774,6 @@
if (__predict_false(va == NULL)) {
KASSERT((flags & M_WAITOK) == 0,
("malloc(M_WAITOK) returned NULL"));
- t_malloc_fail = time_uptime;
}
#ifdef DEBUG_REDZONE
if (va != NULL)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 29, 6:08 AM (9 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30513644
Default Alt Text
D27143.id79337.diff (1 KB)
Attached To
Mode
D27143: malloc: retire malloc_last_fail
Attached
Detach File
Event Timeline
Log In to Comment