Lines Matching defs:this

8  * Version 2.0 (the 'License'). You may not use this file except in
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
36 * Permission to use, copy, modify and distribute this software and its
38 * notice and this permission notice appear in all copies of the
46 * Carnegie Mellon requests users of this software to return to
107 * "zp-factor=N" as a boot-arg. To turn this feature off, set "zp-factor=0" or "-no-zp".
116 * As a result, each element (that is large enough to hold this data inside) must be marked
130 * "zlog=<zone name to log> -zc". Search for "Zone corruption logging" later in this
153 * Frees the specified element, which is within the specified zone. If this
164 /* should we run checks on this piece of memory? */
284 * physical page is returned to the VM system. During this process, the
420 * When enabled, this code keeps a log to track allocations to a particular zone that have not
421 * yet been freed. Examining this log will reveal the source of a zone leak. The log is allocated
432 * is most likely the problem zone, so set zlog in boot-args to this zone name, reboot and re-run the test. The
433 * next time it panics with this message, examine the log using the kgmacros zstack, findoldest and countpcs.
454 * The number of records in the log is configurable via the zrecs parameter in boot-args. Set this to
458 * records since going much larger than this tends to make the system unresponsive and unbootable on small
502 * Decide if we want to log this zone by doing a string compare between a zone name and the name
543 * Test if we want to log this zalloc/zfree event. We log if this is the zone we're interested in and
607 vm_size_t za_size; /* how much memory did this allocation take up? */
609 /* TODO: #if this out */
623 /* not static so that panic can see this, see kern/debug.c */
865 if (trace->zt_depth != 0) /* if this slot was previously used but not currently in use */
964 * If this function is inlined, it doesn't record the frame of the function it's inside.
1058 * TODO: Determine how well distributed this is
1211 * Check if we should be logging this zone. If so, remember the zone pointer.
1229 * We got the memory for the log. Zero it out since the code needs this to identify unused records.
1230 * At this point, everything is set up and we're ready to start logging this zone.
1674 uint32_t zleak_tracedepth = 0; /* log this allocation if nonzero */
1687 * If zone logging is turned on and this is the zone we're tracking, grab a backtrace.
1696 * allocations in this zone.
1725 * Someone is allocating memory for this zone.
1830 /* TODO: Change this to something more descriptive, perhaps
1860 * If we're sampling this allocation, add it to the zleaks hash table.
1873 * See if we should be logging allocations in this zone. Logging is rarely done except when a leak is
1874 * suspected, so this code rarely executes. We need to do this code while still holding the zone lock
1881 * Look for a place to record this new allocation. We implement two different logging strategies
1887 * element can be inspected. So in this case, we treat the log as a circular buffer and overwrite the
1919 * Save a record of this allocation
2023 * XXX: It seems like only vm_page_grab_fictitious_common uses this, and its
2025 * this is used for interrupts any more....
2035 uint32_t zleak_tracedepth = 0; /* log this allocation if nonzero */
2083 /* Keep this FALSE by default. Large memory machine run orders of magnitude
2103 * If zone logging is turned on and this is the zone we're tracking, grab a backtrace.
2137 * See if we're doing logging on this zone. There are two styles of logging used depending on
2147 * We're logging to catch a corruption. Add a record of this zfree operation
2172 * We're logging to catch a leak. Remove any record we might have for this
2210 vm_offset_t this;
2214 for (this = zone->free_elements;
2215 this != 0;
2216 this = * (vm_offset_t *) this)
2217 if (!pmap_kernel_va(this) || this == elem)
2526 * This element was the last one on this page, re-use the page's
2781 * If this is the last allocation on the page(s),