Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 110240
b: refs/heads/master
c: 70096a5
h: refs/heads/master
v: v3
  • Loading branch information
Matt Mackall authored and Linus Torvalds committed Oct 9, 2008
1 parent d18ca30 commit 5c1f650
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 69849375d6b13e94d08cdc94b49b11fbab454a0e
refs/heads/master: 70096a561d1e09120bae1f293f3632cedbfd5c68
8 changes: 5 additions & 3 deletions trunk/mm/slob.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,9 +514,11 @@ size_t ksize(const void *block)
return 0;

sp = (struct slob_page *)virt_to_page(block);
if (slob_page(sp))
return (((slob_t *)block - 1)->units - 1) * SLOB_UNIT;
else
if (slob_page(sp)) {
int align = max(ARCH_KMALLOC_MINALIGN, ARCH_SLAB_MINALIGN);
unsigned int *m = (unsigned int *)(block - align);
return SLOB_UNITS(*m) * SLOB_UNIT;
} else
return sp->page.private;
}

Expand Down

0 comments on commit 5c1f650

Please sign in to comment.