diff options
| author | Jeff Roberson <jeff@FreeBSD.org> | 2002-05-02 09:05:36 +0000 |
|---|---|---|
| committer | Jeff Roberson <jeff@FreeBSD.org> | 2002-05-02 09:05:36 +0000 |
| commit | b9ba89317958b9834349f1328eb08b47a17dcb51 (patch) | |
| tree | af39017f7f36c72011c060f3b23a2851f287acae | |
| parent | 1cae1662181ac496b76cf7ecc1291356670dbee8 (diff) | |
Notes
| -rw-r--r-- | sys/vm/uma_core.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index 45adab43cc68..39aca9e1fd63 100644 --- a/sys/vm/uma_core.c +++ b/sys/vm/uma_core.c @@ -1325,10 +1325,10 @@ zalloc_start: KASSERT(item != NULL, ("uma_zalloc: Bucket pointer mangled.")); cache->uc_allocs++; - CPU_UNLOCK(zone, cpu); #ifdef INVARIANTS uma_dbg_alloc(zone, NULL, item); #endif + CPU_UNLOCK(zone, cpu); if (zone->uz_ctor) zone->uz_ctor(item, zone->uz_size, udata); if (flags & M_ZERO) @@ -1625,13 +1625,6 @@ uma_zfree_arg(uma_zone_t zone, void *item, void *udata) if (zone->uz_flags & UMA_ZFLAG_FULL) goto zfree_internal; -#ifdef INVARIANTS - if (zone->uz_flags & UMA_ZFLAG_MALLOC) - uma_dbg_free(zone, udata, item); - else - uma_dbg_free(zone, NULL, item); -#endif - zfree_restart: cpu = PCPU_GET(cpuid); CPU_LOCK(zone, cpu); @@ -1653,6 +1646,12 @@ zfree_start: bucket->ub_bucket[bucket->ub_ptr] = item; if (zone->uz_dtor) zone->uz_dtor(item, zone->uz_size, udata); +#ifdef INVARIANTS + if (zone->uz_flags & UMA_ZFLAG_MALLOC) + uma_dbg_free(zone, udata, item); + else + uma_dbg_free(zone, NULL, item); +#endif CPU_UNLOCK(zone, cpu); return; } else if (cache->uc_allocbucket) { |
