Deleted Added
full compact
kern_malloc.c (226163) kern_malloc.c (226313)
1/*-
2 * Copyright (c) 1987, 1991, 1993
3 * The Regents of the University of California.
4 * Copyright (c) 2005-2009 Robert N. M. Watson
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 29 unchanged lines hidden (view full) ---

38 * and a special UMA allocation interface is used for larger allocations.
39 * Callers declare memory types, and statistics are maintained independently
40 * for each memory type. Statistics are maintained per-CPU for performance
41 * reasons. See malloc(9) and comments in malloc.h for a detailed
42 * description.
43 */
44
45#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1987, 1991, 1993
3 * The Regents of the University of California.
4 * Copyright (c) 2005-2009 Robert N. M. Watson
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 29 unchanged lines hidden (view full) ---

38 * and a special UMA allocation interface is used for larger allocations.
39 * Callers declare memory types, and statistics are maintained independently
40 * for each memory type. Statistics are maintained per-CPU for performance
41 * reasons. See malloc(9) and comments in malloc.h for a detailed
42 * description.
43 */
44
45#include <sys/cdefs.h>
46__FBSDID("$FreeBSD: head/sys/kern/kern_malloc.c 226163 2011-10-08 18:29:30Z alc $");
46__FBSDID("$FreeBSD: head/sys/kern/kern_malloc.c 226313 2011-10-12 18:08:28Z glebius $");
47
48#include "opt_ddb.h"
49#include "opt_kdtrace.h"
50#include "opt_vm.h"
51
52#include <sys/param.h>
53#include <sys/systm.h>
54#include <sys/kdb.h>

--- 398 unchanged lines hidden (view full) ---

453 }
454 }
455#endif
456 if (flags & M_WAITOK)
457 KASSERT(curthread->td_intr_nesting_level == 0,
458 ("malloc(M_WAITOK) in interrupt context"));
459
460#ifdef DEBUG_MEMGUARD
47
48#include "opt_ddb.h"
49#include "opt_kdtrace.h"
50#include "opt_vm.h"
51
52#include <sys/param.h>
53#include <sys/systm.h>
54#include <sys/kdb.h>

--- 398 unchanged lines hidden (view full) ---

453 }
454 }
455#endif
456 if (flags & M_WAITOK)
457 KASSERT(curthread->td_intr_nesting_level == 0,
458 ("malloc(M_WAITOK) in interrupt context"));
459
460#ifdef DEBUG_MEMGUARD
461 if (memguard_cmp(mtp, size)) {
461 if (memguard_cmp_mtp(mtp, size)) {
462 va = memguard_alloc(size, flags);
463 if (va != NULL)
464 return (va);
465 /* This is unfortunate but should not be fatal. */
466 }
467#endif
468
469#ifdef DEBUG_REDZONE

--- 579 unchanged lines hidden ---
462 va = memguard_alloc(size, flags);
463 if (va != NULL)
464 return (va);
465 /* This is unfortunate but should not be fatal. */
466 }
467#endif
468
469#ifdef DEBUG_REDZONE

--- 579 unchanged lines hidden ---