Revision ae80a2de lib/mempool.c

View differences:

lib/mempool.c
27 27

  
28 28
struct lp_chunk {
29 29
  struct lp_chunk *next;
30
  unsigned int size;
30
  uint size;
31 31
  uintptr_t data_align[0];
32 32
  byte data[0];
33 33
};
......
37 37
  byte *ptr, *end;
38 38
  struct lp_chunk *first, *current, **plast;	/* Normal (reusable) chunks */
39 39
  struct lp_chunk *first_large;			/* Large chunks */
40
  unsigned chunk_size, threshold, total, total_large;
40
  uint chunk_size, threshold, total, total_large;
41 41
};
42 42

  
43 43
static void lp_free(resource *);
......
64 64
 * @blk.
65 65
 */
66 66
linpool
67
*lp_new(pool *p, unsigned blk)
67
*lp_new(pool *p, uint blk)
68 68
{
69 69
  linpool *m = ralloc(p, &lp_class);
70 70
  m->plast = &m->first;
......
88 88
 * size chunk, an "overflow" chunk is created for it instead.
89 89
 */
90 90
void *
91
lp_alloc(linpool *m, unsigned size)
91
lp_alloc(linpool *m, uint size)
92 92
{
93 93
  byte *a = (byte *) BIRD_ALIGN((unsigned long) m->ptr, CPU_STRUCT_ALIGN);
94 94
  byte *e = a + size;
......
146 146
 * how to allocate strings without any space overhead.
147 147
 */
148 148
void *
149
lp_allocu(linpool *m, unsigned size)
149
lp_allocu(linpool *m, uint size)
150 150
{
151 151
  byte *a = m->ptr;
152 152
  byte *e = a + size;
......
168 168
 * clears the allocated memory block.
169 169
 */
170 170
void *
171
lp_allocz(linpool *m, unsigned size)
171
lp_allocz(linpool *m, uint size)
172 172
{
173 173
  void *z = lp_alloc(m, size);
174 174

  

Also available in: Unified diff