summaryrefslogtreecommitdiff
path: root/lib/slab.c
diff options
context:
space:
mode:
authorPavel TvrdĂ­k <pawel.tvrdik@gmail.cz>2015-05-19 08:53:34 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2015-06-08 02:24:08 +0200
commitae80a2de95d3d3c153ce20b90c9d8757d02cb33d (patch)
treebe0c9427556557ff5b06b0250bc64ff33062199e /lib/slab.c
parente348ef01b433e06888310c1098a05291034a856c (diff)
unsigned [int] -> uint
Diffstat (limited to 'lib/slab.c')
-rw-r--r--lib/slab.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/slab.c b/lib/slab.c
index 31529c30..5c414f9e 100644
--- a/lib/slab.c
+++ b/lib/slab.c
@@ -51,7 +51,7 @@ static size_t slab_memsize(resource *r);
struct slab {
resource r;
- unsigned size;
+ uint size;
list objs;
};
@@ -71,7 +71,7 @@ struct sl_obj {
};
slab *
-sl_new(pool *p, unsigned size)
+sl_new(pool *p, uint size)
{
slab *s = ralloc(p, &sl_class);
s->size = size;
@@ -144,7 +144,7 @@ slab_memsize(resource *r)
struct slab {
resource r;
- unsigned obj_size, head_size, objs_per_slab, num_empty_heads, data_size;
+ uint obj_size, head_size, objs_per_slab, num_empty_heads, data_size;
list empty_heads, partial_heads, full_heads;
};
@@ -185,10 +185,10 @@ struct sl_alignment { /* Magic structure for testing of alignment */
* objects of size @size can be allocated.
*/
slab *
-sl_new(pool *p, unsigned size)
+sl_new(pool *p, uint size)
{
slab *s = ralloc(p, &sl_class);
- unsigned int align = sizeof(struct sl_alignment);
+ uint align = sizeof(struct sl_alignment);
if (align < sizeof(int))
align = sizeof(int);
s->data_size = size;
@@ -214,7 +214,7 @@ sl_new_head(slab *s)
struct sl_head *h = xmalloc(SLAB_SIZE);
struct sl_obj *o = (struct sl_obj *)((byte *)h+s->head_size);
struct sl_obj *no;
- unsigned int n = s->objs_per_slab;
+ uint n = s->objs_per_slab;
h->first_free = o;
h->num_full = 0;