Skip to content

Commit

Permalink
uma: Remove a bogus setbounds operation
Browse files Browse the repository at this point in the history
It's up to the backend allocator to apply bounds.  When UMA is allocating
memory, this is already done in the keg (slab allocator) layer.  For cache
zones, where UMA is just providing a frontend to some custom allocator, we
shouldn't be touching bounds at all; we don't even know that what we're
allocating is memory, UMA is just providing per-CPU caching for pointer-sized
objects.
  • Loading branch information
markjdb committed Jan 10, 2025
1 parent 382feac commit 8e565d7
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions sys/vm/uma_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -4483,10 +4483,6 @@ zone_alloc_item(uma_zone_t zone, void *udata, int domain, int flags)

if (zone->uz_import(zone->uz_arg, &item, 1, domain, flags) != 1)
goto fail_cnt;
#ifdef __CHERI_PURE_CAPABILITY__
if ((zone->uz_flags & UMA_ZONE_PCPU) == 0)
item = cheri_setboundsexact(item, zone->uz_size);
#endif

/*
* We have to call both the zone's init (not the keg's init)
Expand Down

0 comments on commit 8e565d7

Please sign in to comment.